-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.9 KB
/
release.yml
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
52
53
name: Release
on: [push]
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
permissions:
# Needed to create PR statuses/checks
checks: write
statuses: write
# Needed to push git tags, release
contents: write
# Needed to push packages and write CHANGELOG
packages: write
issues: read
# Needed to write back to PR to include build info
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Prepare repository
# Fetch full git history and tags
run: git fetch --unshallow --tags
- name: Unset header
run: |
git config --local --unset http.https://github.com/.extraheader
git config --global user.name "Amp Automation"
git config --global user.email "[email protected]"
- name: Use NVM Node.js version
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: 'https://npm.pkg.github.com'
scope: "@amplience"
- name: Create Release
env:
# environmental vars for actions/setup-node, should use same GH token for both GH_TOKEN and NPM_TOKEN
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This token is scoped to public repo's and has read|write on actions|contents|PR and issues|metadata readonly
# It is specifically required to allow commits back to this repository as part of `auto shipit`
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_PUBLIC_REPO_CONTENTS_ACCESS }}
# this project is configured to use the auto-shipit/conventional-commits plugin
run: |
npm install --frozen-lockfile
npm run build
npx auto shipit