From 68b40b646bbc6d4fe539cc2fc07bdb3e603c490e Mon Sep 17 00:00:00 2001 From: Igor Katsuba Date: Wed, 29 Nov 2023 09:53:32 +0200 Subject: [PATCH] ci: try to set up the right token for git (#334) --- .github/workflows/release.yml | 21 ++++++++++----------- nx.json | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c608c3e9..e206296b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,15 +65,16 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ steps.generate_token.outputs.token }} + - name: Set up Git + run: | + git config user.name github-actions + git config user.email github-actions@github.com - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: 18 cache: npm - - name: Set up Git - run: | - git config user.name "GitHub Bot" - git config user.email "gituser@example.com" - name: Install dependencies run: npm ci - name: Execute version target on all affected packages and release them @@ -81,10 +82,8 @@ jobs: 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: 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 + - name: Tag latest + shell: bash + run: | + git tag -f latest + git push origin latest --force diff --git a/nx.json b/nx.json index 8db4b4fcd..be66173ef 100644 --- a/nx.json +++ b/nx.json @@ -24,7 +24,8 @@ "commitMessageFormat": "release({projectName}): {version} [skip ci]", "tagPrefix": "{projectName}@", "preset": "angular", - "postTargets": ["github"] + "postTargets": ["github"], + "push": true } }, "github": {