forked from Synthetixio/synpress
-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (39 loc) · 1.34 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
name: Release Package
on:
push:
branches:
- master
jobs:
release:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Authenticate with npm and show .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
cat ~/.npmrc | sed 's/:_authToken=.*/:_authToken=[SECURED]/'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Configure Git
run: |
git config --global user.name "${{ secrets.GIT_USER }}"
git config --global user.email "${{ secrets.GIT_EMAIL }}"
echo "Configured Git user.name: $(git config --global user.name)"
echo "Configured Git user.email: $(git config --global user.email)"
- name: Release with release-it
run: npx --ignore-existing release-it
env:
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_EMAIL }}
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}