-
Notifications
You must be signed in to change notification settings - Fork 85
45 lines (36 loc) · 1.09 KB
/
publish_snapshot.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
name: Publish (Snapshot)
on:
workflow_dispatch:
permissions:
contents: write
id-token: write
jobs:
publish_snapshot:
name: Publish (Snapshot)
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@main
with:
persist-credentials: true # needed for git push
- uses: ./.github/actions/setup-deps
- name: version packages
run: pnpm changeset version --snapshot ${{ inputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: git commit
run: |
git config --global user.name 'Thinkmill Release Bot'
git config --global user.email '[email protected]'
git commit -a -m 'rc'
- run: pnpm build:packages
- name: npm publish, git tag
run: pnpm changeset publish --tag test
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# reset, then push the dangling commit
- name: git push
run: |
git reset HEAD~1 --hard
git push origin --tags