From 8899872bc51820a319d6875c64be42799344b4ad Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 1 Jul 2022 09:05:07 +0530 Subject: Trying to check if tagging of submodule works [skip ci] --- .github/workflows/builds.yml | 20 ++++++++++---------- .github/workflows/tag-repos.yml | 28 +++++++++++++++++++--------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 8d3a7646f..1c0035090 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -155,14 +155,12 @@ jobs: run: npm run lint && npm run test - name: Build Ferdium without publish for any branch not 'nightly' and not 'release' if: ${{ env.GIT_BRANCH_NAME != 'nightly' && env.GIT_BRANCH_NAME != 'release' }} - run: npm run build -- --publish never - shell: bash env: CSC_IDENTITY_AUTO_DISCOVERY: false + run: npm run build -- --publish never + shell: bash - name: Build Ferdium with publish for 'nightly' branch if: ${{ env.GIT_BRANCH_NAME == 'nightly' }} - run: npm run build -- --publish always - shell: bash env: GH_TOKEN: ${{ secrets.FERDIUM_PUBLISH_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: true @@ -170,10 +168,10 @@ jobs: APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} - - name: Build Ferdium with publish for 'release' branch - if: ${{ env.GIT_BRANCH_NAME == 'release' }} run: npm run build -- --publish always shell: bash + - name: Build Ferdium with publish for 'release' branch + if: ${{ env.GIT_BRANCH_NAME == 'release' }} env: GH_TOKEN: ${{ secrets.FERDIUM_PUBLISH_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: true @@ -181,6 +179,8 @@ jobs: APPLEID_PASSWORD: ${{ secrets.APPLEID_PASSWORD }} CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + run: npm run build -- --publish always + shell: bash build_linux: name: "ubuntu ${{ github.event.inputs.message }}" @@ -361,19 +361,19 @@ jobs: CSC_IDENTITY_AUTO_DISCOVERY: false - name: Build Ferdium with publish for 'nightly' branch if: ${{ env.GIT_BRANCH_NAME == 'nightly' }} - run: npm run build -- --publish always - shell: bash env: GH_TOKEN: ${{ secrets.FERDIUM_PUBLISH_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: true WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} - - name: Build Ferdium with publish for 'release' branch - if: ${{ env.GIT_BRANCH_NAME == 'release' }} run: npm run build -- --publish always shell: bash + - name: Build Ferdium with publish for 'release' branch + if: ${{ env.GIT_BRANCH_NAME == 'release' }} env: GH_TOKEN: ${{ secrets.FERDIUM_PUBLISH_TOKEN }} CSC_IDENTITY_AUTO_DISCOVERY: true WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} + run: npm run build -- --publish always + shell: bash diff --git a/.github/workflows/tag-repos.yml b/.github/workflows/tag-repos.yml index a8459c1e6..794b031bc 100644 --- a/.github/workflows/tag-repos.yml +++ b/.github/workflows/tag-repos.yml @@ -7,29 +7,39 @@ on: workflow_dispatch: jobs: - bump-casks: + tag-repos: runs-on: macos-latest steps: - - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' + - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'release' uses: actions/checkout@v3 - if: ${{ contains(github.event.release.tag_name, 'nightly') }} + if: ${{ contains(github.event.release.tag_name, 'nightly') || (github.event_name == 'workflow_dispatch') }} with: ref: nightly submodules: recursive fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging - - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'scheduled' + - name: Checkout code along with submodules for the 'release' branch if the trigger event is 'release' uses: actions/checkout@v3 if: ${{ !contains(github.event.release.tag_name, 'nightly') }} with: ref: release submodules: recursive fetch-depth: 0 # Note: Needed to be able to pull the 'develop' branch as well for merging - - name: Tag the branch + - name: Extract Git tag name from the currently checked out branch (not from the branch where this run was kicked off) run: | TAG_NAME=$(node -p 'require("./package.json").version') + echo "TAG_NAME=v$TAG_NAME" >> $GITHUB_ENV + shell: bash + - name: Tag the main repo + run: | git tag -f $TAG_NAME git push origin --tags --no-verify - # Also tag the submodule so as to help identify which changes went into which nightly release - # TODO: Not working due to cross-repo access issues by the github-action bot - # git -C recipes tag -f $TAG_NAME - # git -C recipes push origin --tags --no-verify + shell: bash + # Also tag the submodule so as to help identify which changes went into which release + # TODO: Not working due to cross-repo access issues by the github-action bot + # - name: Tag the submodule + # env: + # GH_TOKEN: ${{ secrets.FERDIUM_RECIPES_PUBLISH_TOKEN }} + # run: | + # git -C recipes tag -f $TAG_NAME + # git -C recipes push origin --tags --no-verify + # shell: bash -- cgit v1.2.3-54-g00ecf