@@ -79,19 +79,18 @@ jobs:
7979 NPM_DIST_TAG : latest
8080 NPM_REGISTRY : registry.npmjs.org
8181 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
82- # run: npx -p publib@latest publib-npm
83- run : ls -l dist/js
84- # - name: Extract Version
85- # id: extract-version
86- # if: ${{ failure() }}
87- # run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
88- # - name: Create Issue
89- # if: ${{ failure() }}
90- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
91- # with:
92- # labels: failed-release
93- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to npm failed
94- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
82+ run : npx -p publib@latest publib-npm
83+ - name : Extract Version
84+ id : extract-version
85+ if : ${{ failure() }}
86+ run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
87+ - name : Create Issue
88+ if : ${{ failure() }}
89+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
90+ with :
91+ labels : failed-release
92+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to npm failed
93+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
9594 release_maven :
9695 name : Publish to Maven Central
9796 needs : release
@@ -118,19 +117,18 @@ jobs:
118117 MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
119118 MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
120119 MAVEN_STAGING_PROFILE_ID : ${{ secrets.MAVEN_STAGING_PROFILE_ID }}
121- # run: npx -p publib@latest publib-maven
122- run : ls -l dist/java
123- # - name: Extract Version
124- # id: extract-version
125- # if: ${{ failure() }}
126- # run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
127- # - name: Create Issue
128- # if: ${{ failure() }}
129- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
130- # with:
131- # labels: failed-release
132- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to Maven Central failed
133- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
120+ run : npx -p publib@latest publib-maven
121+ - name : Extract Version
122+ id : extract-version
123+ if : ${{ failure() }}
124+ run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
125+ - name : Create Issue
126+ if : ${{ failure() }}
127+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
128+ with :
129+ labels : failed-release
130+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to Maven Central failed
131+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
134132 release_pypi :
135133 name : Publish to PyPI
136134 needs : release
@@ -154,19 +152,18 @@ jobs:
154152 env :
155153 TWINE_USERNAME : ${{ secrets.TWINE_USERNAME }}
156154 TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
157- # run: npx -p publib@latest publib-pypi
158- run : ls -l dist/python
159- # - name: Extract Version
160- # id: extract-version
161- # if: ${{ failure() }}
162- # run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
163- # - name: Create Issue
164- # if: ${{ failure() }}
165- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
166- # with:
167- # labels: failed-release
168- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to PyPI failed
169- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
155+ run : npx -p publib@latest publib-pypi
156+ - name : Extract Version
157+ id : extract-version
158+ if : ${{ failure() }}
159+ run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
160+ - name : Create Issue
161+ if : ${{ failure() }}
162+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
163+ with :
164+ labels : failed-release
165+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to PyPI failed
166+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
170167 release_nuget :
171168 name : Publish to NuGet Gallery
172169 needs : release
@@ -189,33 +186,32 @@ jobs:
189186 - name : Extract Version
190187 id : extract-version
191188 run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
192- # - name: Log in to MongoDB Docker registry
193- # uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
194- # with:
195- # registry: ${{ secrets.ARTIFACTORY_REGISTRY }}
196- # username: ${{ secrets.ARTIFACTORY_USER }}
197- # password: ${{ secrets.ARTIFACTORY_PASSWORD }}
198- # - name: Sign NuGet package
199- # run: |
200- # docker run \
201- # -e GRS_CONFIG_USER1_USERNAME="${{ secrets.ARTIFACTORY_SIGN_USER }}" \
202- # -e GRS_CONFIG_USER1_PASSWORD="${{ secrets.ARTIFACTORY_SIGN_PASSWORD }}" \
203- # --rm -v "$(pwd)":"$(pwd)" -w "$(pwd)" \
204- # "${{ secrets.ARTIFACTORY_REGISTRY }}/${{ secrets.ARTIFACTORY_SIGN_TOOL }}" \
205- # /bin/bash -c "jsign --tsaurl http://timestamp.digicert.com -a ${{ secrets.AUTHENTICODE_KEY_NAME }} \
206- # ./dist/dotnet/MongoDB.AWSCDKResourcesMongoDBAtlas.${{ steps.extract-version.outputs.VERSION }}.nupkg"
189+ - name : Log in to MongoDB Docker registry
190+ uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
191+ with :
192+ registry : ${{ secrets.ARTIFACTORY_REGISTRY }}
193+ username : ${{ secrets.ARTIFACTORY_USER }}
194+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
195+ - name : Sign NuGet package
196+ run : |
197+ docker run \
198+ -e GRS_CONFIG_USER1_USERNAME="${{ secrets.ARTIFACTORY_SIGN_USER }}" \
199+ -e GRS_CONFIG_USER1_PASSWORD="${{ secrets.ARTIFACTORY_SIGN_PASSWORD }}" \
200+ --rm -v "$(pwd)":"$(pwd)" -w "$(pwd)" \
201+ "${{ secrets.ARTIFACTORY_REGISTRY }}/${{ secrets.ARTIFACTORY_SIGN_TOOL }}" \
202+ /bin/bash -c "jsign --tsaurl http://timestamp.digicert.com -a ${{ secrets.AUTHENTICODE_KEY_NAME }} \
203+ ./dist/dotnet/MongoDB.AWSCDKResourcesMongoDBAtlas.${{ steps.extract-version.outputs.VERSION }}.nupkg"
207204 - name : Release
208205 env :
209206 NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
210- # run: npx -p publib@latest publib-nuget
211- run : ls -l dist/dotnet
212- # - name: Create Issue
213- # if: ${{ failure() }}
214- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
215- # with:
216- # labels: failed-release
217- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to NuGet Gallery failed
218- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
207+ run : npx -p publib@latest publib-nuget
208+ - name : Create Issue
209+ if : ${{ failure() }}
210+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
211+ with :
212+ labels : failed-release
213+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to NuGet Gallery failed
214+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
219215 release_golang :
220216 name : Publish to GitHub Go Module Repository
221217 needs : release
@@ -240,54 +236,53 @@ jobs:
240236 GITHUB_TOKEN : ${{ secrets.GO_GITHUB_TOKEN }}
241237 GIT_USER_NAME : ${{ secrets.GO_GIT_USER_NAME }}
242238 GIT_USER_EMAIL : ${{ secrets.GO_GIT_USER_EMAIL }}
243- # run: npx -p publib@latest publib-golang
244- run : ls -l dist/go
245- # - name: Extract Version
246- # id: extract-version
247- # if: ${{ failure() }}
248- # run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
249- # - name: Create Issue
250- # if: ${{ failure() }}
251- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
252- # with:
253- # labels: failed-release
254- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Go Module Repository failed
255- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
256- # release_github:
257- # name: Publish to GitHub Releases
258- # needs: [release, release_npm, release_maven, release_pypi, release_nuget, release_golang]
259- # runs-on: ubuntu-latest
260- # permissions:
261- # contents: write
262- # issues: write
263- # steps:
264- # - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
265- # with:
266- # node-version: 18.x
267- # - name: Download build artifacts
268- # uses: actions/download-artifact@533298bc57c27f112a2c04a74a04a4d43e2866fd
269- # with:
270- # name: build-artifact
271- # path: dist
272- # - name: Restore build artifact permissions
273- # run: cd dist && setfacl --restore=permissions-backup.acl
274- # continue-on-error: true
275- # - name: Release
276- # env:
277- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
278- # GITHUB_REPOSITORY: ${{ github.repository }}
279- # GITHUB_REF: ${{ github.ref }}
280- # run: errout=$(mktemp); gh release create "$(cat dist/releasetag.txt)" -R "${GITHUB_REPOSITORY}" -F dist/changelog.md -t "$(cat dist/releasetag.txt)" --target "${GITHUB_REF}" 2> "$errout" && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" "$errout"; then cat "$errout"; exit $exitcode; fi
281- # - name: Extract Version
282- # id: extract-version
283- # if: ${{ failure() }}
284- # run: echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
285- # - name: Create Issue
286- # if: ${{ failure() }}
287- # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
288- # env:
289- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
290- # with:
291- # labels: failed-release
292- # title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Releases failed
293- # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
239+ run : npx -p publib@latest publib-golang
240+ - name : Extract Version
241+ id : extract-version
242+ if : ${{ failure() }}
243+ run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
244+ - name : Create Issue
245+ if : ${{ failure() }}
246+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
247+ with :
248+ labels : failed-release
249+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Go Module Repository failed
250+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
251+ release_github :
252+ name : Publish to GitHub Releases
253+ needs : [release, release_npm, release_maven, release_pypi, release_nuget, release_golang]
254+ runs-on : ubuntu-latest
255+ permissions :
256+ contents : write
257+ issues : write
258+ steps :
259+ - uses : actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e
260+ with :
261+ node-version : 18.x
262+ - name : Download build artifacts
263+ uses : actions/download-artifact@533298bc57c27f112a2c04a74a04a4d43e2866fd
264+ with :
265+ name : build-artifact
266+ path : dist
267+ - name : Restore build artifact permissions
268+ run : cd dist && setfacl --restore=permissions-backup.acl
269+ continue-on-error : true
270+ - name : Release
271+ env :
272+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
273+ GITHUB_REPOSITORY : ${{ github.repository }}
274+ GITHUB_REF : ${{ github.ref }}
275+ run : errout=$(mktemp); gh release create "$(cat dist/releasetag.txt)" -R "${GITHUB_REPOSITORY}" -F dist/changelog.md -t "$(cat dist/releasetag.txt)" --target "${GITHUB_REF}" 2> "$errout" && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" "$errout"; then cat "$errout"; exit $exitcode; fi
276+ - name : Extract Version
277+ id : extract-version
278+ if : ${{ failure() }}
279+ run : echo "VERSION=$(cat dist/version.txt)" >> "${GITHUB_OUTPUT}"
280+ - name : Create Issue
281+ if : ${{ failure() }}
282+ uses : imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
283+ env :
284+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
285+ with :
286+ labels : failed-release
287+ title : Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Releases failed
288+ body : See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
0 commit comments