chore(deps): upgrade dependencies (#760) #522
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". | |
name: release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
latest_commit: ${{ steps.git_remote.outputs.latest_commit }} | |
tag_exists: ${{ steps.check_tag_exists.outputs.exists }} | |
env: | |
CI: "true" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
- name: Set git identity | |
run: |- | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
- name: Setup Node.js | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: yarn install --check-files --frozen-lockfile | |
- name: release | |
run: npx projen release | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: coverage | |
- name: Check if version has already been tagged | |
id: check_tag_exists | |
run: |- | |
TAG=$(cat dist/dist/releasetag.txt) | |
([ ! -z "$TAG" ] && git ls-remote -q --exit-code --tags origin $TAG && (echo "exists=true" >> $GITHUB_OUTPUT)) || (echo "exists=false" >> $GITHUB_OUTPUT) | |
cat $GITHUB_OUTPUT | |
- name: Check for new commits | |
id: git_remote | |
run: |- | |
echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT | |
cat $GITHUB_OUTPUT | |
- name: Backup artifact permissions | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
run: cd dist && getfacl -R . > permissions-backup.acl | |
continue-on-error: true | |
- name: Upload artifact | |
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} | |
uses: actions/upload-artifact@18bf333cd2249fbbbdb605fd9d9ed57efd7adf34 | |
with: | |
name: build-artifact | |
path: dist | |
overwrite: true | |
release_github: | |
name: Publish to GitHub Releases | |
needs: | |
- release | |
- release_npm | |
- release_maven | |
- release_pypi | |
- release_nuget | |
- release_golang | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Collect GitHub Metadata | |
run: mv .repo/dist dist | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
GITHUB_REF: ${{ github.sha }} | |
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 | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Releases failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
release_npm: | |
name: Publish to npm | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Install Dependencies | |
run: cd .repo && yarn install --check-files --frozen-lockfile | |
- name: Create js artifact | |
run: cd .repo && npx projen package:js | |
- name: Collect js Artifact | |
run: mv .repo/dist dist | |
- name: Release | |
env: | |
NPM_DIST_TAG: latest | |
NPM_REGISTRY: registry.npmjs.org | |
NPM_CONFIG_PROVENANCE: "true" | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx -p publib@latest publib-npm | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to npm failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
release_maven: | |
name: Publish to Maven Central | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 | |
with: | |
distribution: corretto | |
java-version: "11" | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Install Dependencies | |
run: cd .repo && yarn install --check-files --frozen-lockfile | |
- name: Create java artifact | |
run: cd .repo && npx projen package:java | |
- name: Collect java Artifact | |
run: mv .repo/dist dist | |
- name: Release | |
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 }} | |
run: npx -p publib@latest publib-maven | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to Maven Central failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
release_pypi: | |
name: Publish to PyPI | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d | |
with: | |
python-version: 3.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Install Dependencies | |
run: cd .repo && yarn install --check-files --frozen-lockfile | |
- name: Create python artifact | |
run: cd .repo && npx projen package:python | |
- name: Collect python Artifact | |
run: mv .repo/dist dist | |
- name: Release | |
env: | |
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
run: npx -p publib@latest publib-pypi | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to PyPI failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
release_nuget: | |
name: Publish to NuGet Gallery | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 | |
with: | |
dotnet-version: 6.x | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Install Dependencies | |
run: cd .repo && yarn install --check-files --frozen-lockfile | |
- name: Create dotnet artifact | |
run: cd .repo && npx projen package:dotnet | |
- name: Collect dotnet Artifact | |
run: mv .repo/dist dist | |
- name: Release | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
run: npx -p publib@latest publib-nuget | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to NuGet Gallery failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
release_golang: | |
name: Publish to GitHub Go Module Repository | |
needs: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha | |
steps: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 20.x | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 | |
with: | |
go-version: ^1.18.0 | |
- name: Download build artifacts | |
uses: actions/download-artifact@b4aefff88e83a2676a730654e1ce3dce61880379 | |
with: | |
name: build-artifact | |
path: dist | |
- name: Restore build artifact permissions | |
run: cd dist && setfacl --restore=permissions-backup.acl | |
continue-on-error: true | |
- name: Prepare Repository | |
run: mv dist .repo | |
- name: Install Dependencies | |
run: cd .repo && yarn install --check-files --frozen-lockfile | |
- name: Create go artifact | |
run: cd .repo && npx projen package:go | |
- name: Collect go Artifact | |
run: mv .repo/dist dist | |
- name: Release | |
env: | |
GIT_USER_NAME: github-actions | |
GIT_USER_EMAIL: [email protected] | |
GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }} | |
run: npx -p publib@latest publib-golang | |
- name: Extract Version | |
id: extract-version | |
if: ${{ failure() }} | |
run: echo "VERSION=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
- name: Create Issue | |
if: ${{ failure() }} | |
uses: imjohnbo/issue-bot@3daae12aa54d38685d7ff8459fc8a2aee8cea98b | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
labels: gh-workflow-failing | |
title: Publishing v${{ steps.extract-version.outputs.VERSION }} to GitHub Go Module Repository failed | |
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} |