fix: resolve lodash-es prototype pollution vulnerability (GHSA-xxjr-m… #66
This file contains hidden or 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
| name: release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**' | |
| - package.json | |
| - API.md | |
| - .github/workflows/release.yml | |
| workflow_dispatch: {} | |
| jobs: | |
| release_github: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set git identity | |
| run: |- | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Zig toolchain | |
| uses: korandoru/setup-zig@v1 | |
| with: | |
| zig-version: 0.13.0 | |
| - name: Install Cargo Lambda | |
| uses: jaxxstorm/action-install-gh-release@v1.9.0 | |
| with: | |
| repo: cargo-lambda/cargo-lambda | |
| tag: v1.5.0 | |
| platform: linux | |
| arch: x86_64 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '7.x' | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.x' | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17.x' | |
| distribution: 'temurin' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12.3 | |
| - name: Install NPM dependencies | |
| run: npx projen install:ci | |
| env: | |
| CI: "true" | |
| - name: Build | |
| env: | |
| CI: "true" | |
| run: npx projen build --verbose | |
| - name: Release | |
| env: | |
| CI: "true" | |
| run: npx projen release | |
| - name: Store release data | |
| id: release_data | |
| run: | | |
| echo "tag=$(cat dist/releasetag.txt)" >> $GITHUB_OUTPUT | |
| echo "version=$(cat dist/version.txt)" >> $GITHUB_OUTPUT | |
| - name: Output release data | |
| run: | | |
| echo ${{ steps.release_data.outputs.tag }} | |
| echo ${{ steps.release_data.outputs.version }} | |
| - name: Release GitHub | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_REF: ${{ github.ref }} | |
| 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: Release JS Artifact | |
| env: | |
| NPM_DIST_TAG: latest | |
| NPM_REGISTRY: registry.npmjs.org | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npx -p publib@latest publib-npm | |
| - name: Create Java Artifact | |
| run: npx projen package:java | |
| - name: Release Java Artifact | |
| env: | |
| MAVEN_SERVER_ID: 'github' | |
| MAVEN_REPOSITORY_URL: 'https://maven.pkg.github.com/cargo-lambda/cargo-lambda-cdk' | |
| MAVEN_ENDPOINT: 'https://maven.pkg.github.com' | |
| MAVEN_USERNAME: ${{ github.actor }} | |
| MAVEN_PASSWORD: ${{ secrets.CDK_PACKAGES_REGISTRY_GITHUB_TOKEN }} | |
| run: npx -p publib@latest publib-maven | |
| - name: Create Python Artifact | |
| run: npx projen package:python | |
| - name: Release Python Artifact | |
| env: | |
| TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
| run: npx -p publib@latest publib-pypi | |
| - name: Create Dotnet Artifact | |
| run: npx projen package:dotnet | |
| - name: Release Dotnet Artifact | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| run: npx -p publib@latest publib-nuget | |
| - name: Create Go Artifact | |
| run: npx projen package:go | |
| - name: Release Go Artifact | |
| env: | |
| GIT_USER_NAME: github-actions | |
| GIT_USER_EMAIL: github-actions@github.com | |
| GITHUB_TOKEN: ${{ secrets.CDK_PACKAGES_REGISTRY_GITHUB_TOKEN }} | |
| run: npx -p publib@latest publib-golang |