Skip to content

Commit a62a00c

Browse files
committed
Revert "publish to GH"
This reverts commit 29c8efc.
1 parent 29c8efc commit a62a00c

File tree

1 file changed

+176
-1
lines changed

1 file changed

+176
-1
lines changed

.github/workflows/release.yml

Lines changed: 176 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,184 @@ jobs:
5353
name: build-artifact
5454
path: dist
5555
overwrite: true
56+
release_npm:
57+
name: Publish to npm
58+
needs: release
59+
runs-on: ubuntu-latest
60+
permissions:
61+
contents: read
62+
issues: write
63+
id-token: write # Required for Trusted Publishing.
64+
steps:
65+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
66+
with:
67+
node-version: 24.x
68+
registry-url: https://registry.npmjs.org
69+
- name: Download build artifacts
70+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
71+
with:
72+
name: build-artifact
73+
path: dist
74+
- name: Restore build artifact permissions
75+
run: cd dist && setfacl --restore=permissions-backup.acl
76+
continue-on-error: true
77+
- name: Publish to npm
78+
env:
79+
NPM_TRUSTED_PUBLISHER: true
80+
run: npx -p publib@latest publib-npm
81+
release_maven:
82+
name: Publish to Maven Central
83+
needs: release
84+
runs-on: ubuntu-latest
85+
permissions:
86+
contents: read
87+
issues: write
88+
steps:
89+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
90+
with:
91+
distribution: temurin
92+
java-version: 21.x
93+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
94+
with:
95+
node-version: 24.x
96+
- name: Download build artifacts
97+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
98+
with:
99+
name: build-artifact
100+
path: dist
101+
- name: Restore build artifact permissions
102+
run: cd dist && setfacl --restore=permissions-backup.acl
103+
continue-on-error: true
104+
- name: Release
105+
env:
106+
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
107+
MAVEN_GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.MAVEN_GPG_PRIVATE_KEY_PASSPHRASE }}
108+
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
109+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
110+
MAVEN_STAGING_PROFILE_ID: ${{ secrets.MAVEN_STAGING_PROFILE_ID }}
111+
MAVEN_SERVER_ID: ${{ vars.MAVEN_SERVER_ID }}
112+
run: npx -p publib@latest publib-maven
113+
release_pypi:
114+
name: Publish to PyPI
115+
needs: release
116+
runs-on: ubuntu-latest
117+
permissions:
118+
contents: read
119+
issues: write
120+
id-token: write # Required for Trusted Publishing.
121+
steps:
122+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
123+
with:
124+
node-version: 24.x
125+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
126+
with:
127+
python-version: 3.x
128+
- name: Download build artifacts
129+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
130+
with:
131+
name: build-artifact
132+
path: dist
133+
- name: Restore build artifact permissions
134+
run: cd dist && setfacl --restore=permissions-backup.acl
135+
continue-on-error: true
136+
- name: Import GPG key
137+
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec
138+
with:
139+
gpg_private_key: ${{ secrets.APIX_BOT_GPG_PRIVATE_KEY }}
140+
passphrase: ${{ secrets.APIX_BOT_GPG_PASSPHRASE }}
141+
- name: GPG sign PyPI distributions
142+
run: |
143+
for file in dist/python/*.whl dist/python/*.tar.gz; do
144+
if [ -f "$file" ]; then
145+
gpg --batch --yes --pinentry-mode loopback --passphrase "$APIX_BOT_GPG_PASSPHRASE" --detach-sign -a "$file"
146+
fi
147+
done
148+
env:
149+
APIX_BOT_GPG_PASSPHRASE: ${{ secrets.APIX_BOT_GPG_PASSPHRASE }}
150+
- name: Upload to PyPI
151+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
152+
with:
153+
packages-dir: dist/python/
154+
release_nuget:
155+
name: Publish to NuGet Gallery
156+
needs: release
157+
runs-on: ubuntu-latest
158+
permissions:
159+
contents: read
160+
issues: write
161+
id-token: write # Required for Trusted Publishing.
162+
steps:
163+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
164+
with:
165+
node-version: 24.x
166+
- uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d
167+
with:
168+
dotnet-version: 9.0.x
169+
- name: Download build artifacts
170+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
171+
with:
172+
name: build-artifact
173+
path: dist
174+
- name: Restore build artifact permissions
175+
run: cd dist && setfacl --restore=permissions-backup.acl
176+
continue-on-error: true
177+
- name: Extract Version
178+
id: extract-version
179+
run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
180+
- name: Log in to MongoDB Docker registry
181+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
182+
with:
183+
registry: ${{ secrets.ARTIFACTORY_REGISTRY }}
184+
username: ${{ secrets.ARTIFACTORY_USER }}
185+
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
186+
- name: Sign NuGet package
187+
run: |
188+
docker run \
189+
-e GRS_CONFIG_USER1_USERNAME="${{ secrets.ARTIFACTORY_SIGN_USER }}" \
190+
-e GRS_CONFIG_USER1_PASSWORD="${{ secrets.ARTIFACTORY_SIGN_PASSWORD }}" \
191+
--rm -v "$(pwd)":"$(pwd)" -w "$(pwd)" \
192+
"${{ secrets.ARTIFACTORY_REGISTRY }}/${{ secrets.ARTIFACTORY_SIGN_TOOL }}" \
193+
/bin/bash -c "jsign --tsaurl http://timestamp.digicert.com -a ${{ secrets.AUTHENTICODE_KEY_NAME }} \
194+
./dist/dotnet/MongoDB.AWSCDKResourcesMongoDBAtlas.${{ steps.extract-version.outputs.VERSION }}.nupkg"
195+
- id: login
196+
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544
197+
with:
198+
user: ${{ secrets.NUGET_USER }}
199+
- name: Release
200+
env:
201+
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
202+
run: npx -p publib@latest publib-nuget
203+
release_golang:
204+
name: Publish to GitHub Go Module Repository
205+
needs: release
206+
runs-on: ubuntu-latest
207+
permissions:
208+
contents: read
209+
issues: write
210+
steps:
211+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
212+
with:
213+
node-version: 24.x
214+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
215+
with:
216+
go-version: ^1.25.0
217+
- name: Download build artifacts
218+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
219+
with:
220+
name: build-artifact
221+
path: dist
222+
- name: Restore build artifact permissions
223+
run: cd dist && setfacl --restore=permissions-backup.acl
224+
continue-on-error: true
225+
- name: Release
226+
env:
227+
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }}
228+
GIT_USER_NAME: ${{ secrets.GO_GIT_USER_NAME }}
229+
GIT_USER_EMAIL: ${{ secrets.GO_GIT_USER_EMAIL }}
230+
run: npx -p publib@latest publib-golang
56231
release_github:
57232
name: Publish to GitHub Releases
58-
needs: [release]
233+
needs: [release, release_npm, release_maven, release_pypi, release_nuget, release_golang]
59234
runs-on: ubuntu-latest
60235
permissions:
61236
contents: write

0 commit comments

Comments
 (0)