-
Notifications
You must be signed in to change notification settings - Fork 3
108 lines (108 loc) · 3.22 KB
/
release.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
release_npm:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npx jsii-pacmak -v --target js
- run: npx publib-npm
env:
NPM_DIST_TAG: latest
NPM_REGISTRY: registry.npmjs.org
NPM_CONFIG_PROVENANCE: "true"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
release_maven:
name: Publish to Maven Central
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: corretto
java-version: "11"
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: npx jsii-pacmak -v --target js
- run: npx publib-maven
env:
MAVEN_ENDPOINT: https://s01.oss.sonatype.org
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }}
MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED
release_pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: npm ci
- run: npx jsii-pacmak -v --target js
- run: npx publib-pypi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
release_nuget:
name: Publish to NuGet Gallery
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x
- run: npm ci
- run: npx jsii-pacmak -v --target js
- run: npx publib-nuget
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
release_golang:
name: Publish to GitHub Go Module Repository
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/setup-go@v5
with:
go-version: ^1.18.0
- run: npm ci
- run: npx jsii-pacmak -v --target js
- run: npx publib-golang
env:
GIT_USER_NAME: cdklabs-automation
GIT_USER_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }}