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 : Build CLI Release
1+ name : Publish Package
22
33on :
44 push :
55 branches :
66 - main
7- workflow_dispatch :
87
98jobs :
10- build-cli :
9+ publish :
1110 runs-on : ubuntu-latest
1211 permissions :
13- contents : write
12+ contents : read
1413 steps :
1514 - uses : actions/checkout@v4
1615
1918 node-version : ' 20'
2019 registry-url : ' https://registry.npmjs.org'
2120
22- - id : version
23- run : echo "version=$(jq -r .version package.json)" >> "$GITHUB_OUTPUT"
24-
2521 - run : npm ci
2622
2723 - run : npm publish --access public
2824 env :
2925 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
30-
31- - run : npm pack
32-
33- - uses : actions/upload-artifact@v4
34- with :
35- name : codeant-cli-v${{ steps.version.outputs.version }}
36- path : codeant-cli-${{ steps.version.outputs.version }}.tgz
37- if-no-files-found : error
38-
39- - uses : softprops/action-gh-release@v2
40- with :
41- tag_name : cli-v${{ steps.version.outputs.version }}
42- name : CodeAnt CLI v${{ steps.version.outputs.version }}
43- files : codeant-cli-${{ steps.version.outputs.version }}.tgz
44- fail_on_unmatched_files : true
45- body : |
46- CodeAnt CLI npm tarball v${{ steps.version.outputs.version }}
47-
48- Commit: ${{ github.sha }}
49- Message: ${{ github.event.head_commit.message }}
You can’t perform that action at this time.
0 commit comments