forked from aehrc/pathling
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (42 loc) · 1.25 KB
/
release-js-import.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
46
# This workflow packages up the pathling-import library, and publishes to NPM.
#
# This is only run when a version tag is pushed.
name: Release js/import
on:
push:
tags:
- 'pathling-import-v**'
env:
# The add-exports and add-opens flags are required for Java 17
MAVEN_OPTS: --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED
jobs:
deploy:
name: NPM
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# This is required so that git-commit-id-plugin can find the latest tag.
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run the deploy goal with Maven
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
mvn --batch-mode deploy \
-pl lib/import -am \
-PnpmPublish \
-DskipTests
timeout-minutes: 30