From 7be149708df87475a06ba7b722817fc9f0990998 Mon Sep 17 00:00:00 2001 From: mhatvan Date: Fri, 13 Aug 2021 09:18:12 +0200 Subject: build: fix beta channel release for snap - moved PACKAGE_VERSION fetching lower in github CI workflow - distinguish naming between beta and stable publish steps - publish snap to snapstore AND github --- .github/workflows/ferdi-builds.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml index d9627c816..885d3e656 100644 --- a/.github/workflows/ferdi-builds.yml +++ b/.github/workflows/ferdi-builds.yml @@ -190,7 +190,6 @@ jobs: echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV echo "MANUAL_REBUILD_ON_NIGHTLY=${{ github.event_name == 'workflow_dispatch' && contains(github.event.inputs.message, '[nightly branch]') }}" >> $GITHUB_ENV echo "SKIP_NOTARIZATION=${{ !contains(github.repository_owner, 'getferdi') }}" >> $GITHUB_ENV - echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch uses: actions/checkout@v2 if: ${{ github.event_name == 'schedule' || env.MANUAL_REBUILD_ON_NIGHTLY == 'true' }} @@ -242,6 +241,9 @@ jobs: run: npm cache clean --force - name: Install node dependencies recursively run: npx lerna bootstrap + - name: Figure out used package.json version + run: echo "PACKAGE_VERSION=$(node -p 'require("./package.json").version')" >> $GITHUB_ENV + shell: bash - name: Package recipes run: npm i && npm run package working-directory: ./recipes @@ -263,7 +265,7 @@ jobs: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=nightlies snapcraft logout shell: bash - - name: Build Ferdi with publish for 'release' branch + - name: Build Ferdi with publish for 'release' beta branch if: ${{ env.GIT_BRANCH_NAME == 'release' && contains(env.PACKAGE_VERSION, 'beta') }} env: GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }} @@ -275,7 +277,7 @@ jobs: npm run build -- --publish always -c.publish.provider=github -c.publish.owner=${{ github.repository_owner }} -c.publish.repo=ferdi -c.snap.publish.channels=beta snapcraft logout shell: bash - - name: Build Ferdi with publish for 'release' branch + - name: Build Ferdi with publish for 'release' stable branch if: ${{ env.GIT_BRANCH_NAME == 'release' && !contains(env.PACKAGE_VERSION, 'beta') }} env: GH_TOKEN: ${{ secrets.FERDI_PUBLISH_TOKEN }} -- cgit v1.2.3-54-g00ecf