File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+ name : Node.js Package
5+
6+ on :
7+ release :
8+ types : [created]
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+ steps :
17+ - uses : actions/checkout@v4
18+ - name : Set up JDK 21
19+ uses : actions/setup-java@v4
20+ with :
21+ java-version : ' 21'
22+ distribution : ' temurin'
23+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
24+ settings-path : ${{ github.workspace }} # location for the settings.xml file
25+
26+ - name : Setup Gradle
27+ uses : gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
28+
29+ - name : Make gradlew executable
30+ run : chmod +x ./gradlew
31+ - name : Build with Gradle
32+ run : ./gradlew build
33+ - uses : actions/setup-node@v4
34+ with :
35+ node-version : 20
36+ registry-url : https://registry.npmjs.org/
37+ - name : Install dependencies
38+ working-directory : dist
39+ run : npm ci
40+ - name : Publish package
41+ working-directory : dist
42+ run : npm publish --access public
43+ env :
44+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments