Skip to content

Commit

Permalink
ci: update release workflow (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
IKatsuba authored Nov 28, 2023
1 parent 7118c8b commit ae22dcf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
3 changes: 1 addition & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"commitMessageFormat": "release({projectName}): {version} [skip ci]",
"tagPrefix": "{projectName}@",
"preset": "angular",
"postTargets": ["github"],
"push": true
"postTargets": ["github"]
}
},
"github": {
Expand Down

0 comments on commit ae22dcf

Please sign in to comment.