File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Pre-Release
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ pre-release :
8+ runs-on : ubuntu-24.04
9+ steps :
10+ - uses : actions/checkout@v6
11+
12+ - uses : actions/setup-node@v6
13+ with :
14+ node-version-file : .nvmrc
15+ registry-url : ' https://npm.pkg.github.com'
16+ scope : ' @${{ github.repository_owner }}'
17+
18+ - name : Install dependencies
19+ run : npm ci --ignore-scripts
20+
21+ - name : Compile and test
22+ run : npm run ci
23+
24+ - name : Prepare pre release
25+ run : |
26+ git_sha=$(git rev-parse --short HEAD)
27+ mv package.json /tmp/package.json
28+ jq --arg git_sha ${git_sha} \
29+ 'del(.repository)
30+ | .version = .version + "-" + $git_sha
31+ | .name = "@${{ github.repository_owner }}/" + .name' \
32+ /tmp/package.json > package.json
33+
34+ - run : npm publish
35+ env :
36+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments