-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (48 loc) · 1.61 KB
/
release.yml
File metadata and controls
51 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Release
on:
push:
branches:
- main
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: Version and release
runs-on: ubuntu-latest
environment: release
env:
NX_NON_NATIVE_HASHER: true
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
steps:
- name: Authenticate as "Code PushUp Bot" GitHub App
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Fetch GitHub App's user ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Configure Git user
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Clone the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- name: Install dependencies
run: npm ci
- name: Version, release and generate changelog
run: npx nx release --skip-publish
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}