-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.4 KB
/
prerelease.yml
File metadata and controls
54 lines (45 loc) · 1.4 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
52
53
54
name: prerelease
on: workflow_dispatch
jobs:
release:
environment: NPM
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Configure Git
run: |
git config user.name "${{ secrets.ADMIN_NAME }}"
git config user.email "${{ secrets.ADMIN_EMAIL }}"
- name: Perform project installation
run: yarn
- name: Bump version
run: yarn node ./apply-prerelease-version.mjs
- name: Retrieve version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Commit and tag version
run: |
git add .
git commit -m "[CI] Bump version to v${{ steps.package-version.outputs.current-version}}"
git tag v${{ steps.package-version.outputs.current-version}}
- name: Push
run: |
git push
git push --tags
- name: Prepare package
run: yarn pack
- name: Publish to NPM (next)
run: npm publish package.tgz --tag next --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}