From ae22dcf62a431c45fe2fee93c7531b5b42018c27 Mon Sep 17 00:00:00 2001 From: Igor Katsuba Date: Tue, 28 Nov 2023 22:49:38 +0200 Subject: [PATCH] ci: update release workflow (#333) --- .github/workflows/release.yml | 20 ++++++++++++++------ nx.json | 3 +-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bba987f87..6c608c3e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,12 @@ jobs: permissions: contents: write steps: + - name: Generate a token + id: generate_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - name: Checkout the repository uses: actions/checkout@v4 with: @@ -72,11 +78,13 @@ jobs: run: npm ci - name: Execute version target on all affected packages and release them env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} # un-exclude packages when they're ready for public release run: npx nx affected --base=latest --target=version --exclude=plugin-lighthouse,nx-plugin --parallel=1 - - name: Tag latest - shell: bash - run: | - git tag -f latest - git push origin latest --force + - name: Push changes and tags + uses: ad-m/github-push-action@master + with: + github_token: ${{ steps.generate_token.outputs.token }} + branch: ${{ github.ref }} + force: true + tags: true diff --git a/nx.json b/nx.json index be66173ef..8db4b4fcd 100644 --- a/nx.json +++ b/nx.json @@ -24,8 +24,7 @@ "commitMessageFormat": "release({projectName}): {version} [skip ci]", "tagPrefix": "{projectName}@", "preset": "angular", - "postTargets": ["github"], - "push": true + "postTargets": ["github"] } }, "github": {