Publish v1.684.0 #924
Workflow file for this run
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: Publish | |
| run-name: Publish ${{ github.ref_name }} | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/_build.yml | |
| release: | |
| name: GitHub Releases | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ needs.build.outputs.artifact_name }} | |
| path: . | |
| - name: Generate release notes | |
| id: changelog | |
| run: | | |
| mkdir tmp | |
| outfile=tmp/changelog.txt | |
| echo "outfile=${outfile}" >> $GITHUB_OUTPUT | |
| npx standard-changelog@^5.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp | |
| sed '1,3d' $outfile.tmp > $outfile | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| fail_on_unmatched_files: true | |
| prerelease: ${{ contains(github.ref_name, '-') }} | |
| files: '*.tgz' | |
| body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }} | |
| npm: | |
| name: npm | |
| uses: ./.github/workflows/_publish.yml | |
| needs: build | |
| with: | |
| artifact_name: ${{ needs.build.outputs.artifact_name }} | |
| registry_url: https://registry.npmjs.org | |
| secrets: | |
| registry_token: ${{ secrets.NPM_TOKEN }} | |
| github: | |
| name: GitHub Packages | |
| uses: ./.github/workflows/_publish.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: build | |
| with: | |
| artifact_name: ${{ needs.build.outputs.artifact_name }} | |
| registry_url: https://npm.pkg.github.com | |
| secrets: | |
| registry_token: ${{ secrets.GITHUB_TOKEN }} | |
| pr-javascript-http: | |
| name: Open PR on seamapi/javascript-http | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: npm | |
| steps: | |
| - name: Checkout seamapi/javascript-http | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: seamapi/javascript-http | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| git_committer_name: ${{ secrets.GIT_USER_NAME }} | |
| git_committer_email: ${{ secrets.GIT_USER_EMAIL }} | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Update @seamapi/types | |
| run: npm install --save-dev --save-exact @seamapi/types@${{ needs.npm.outputs.version }} | |
| - name: Generate code | |
| run: npm run generate | |
| - name: Commit to seamapi/javascript-http | |
| id: commit | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| branch: seamapi/types/${{ needs.npm.outputs.version }} | |
| create_branch: true | |
| commit_message: 'feat: Update to @seamapi/types@${{ needs.npm.outputs.version }}' | |
| commit_user_name: ${{ secrets.GIT_USER_NAME }} | |
| commit_user_email: ${{ secrets.GIT_USER_EMAIL }} | |
| commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> | |
| - name: Open pull request | |
| if: steps.commit.outputs.changes_detected == 'true' | |
| run: gh pr create --fill | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| pr-docs: | |
| name: Open PR on seamapi/docs | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: npm | |
| steps: | |
| - name: Checkout seamapi/docs | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: seamapi/docs | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| git_committer_name: ${{ secrets.GIT_USER_NAME }} | |
| git_committer_email: ${{ secrets.GIT_USER_EMAIL }} | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Update @seamapi/types | |
| run: npm install --save-dev --save-exact @seamapi/types@${{ needs.npm.outputs.version }} | |
| - name: Commit to seamapi/docs | |
| id: commit | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| branch: seamapi/types/${{ needs.npm.outputs.version }} | |
| create_branch: true | |
| commit_message: 'feat: Update to @seamapi/types@${{ needs.npm.outputs.version }}' | |
| commit_user_name: ${{ secrets.GIT_USER_NAME }} | |
| commit_user_email: ${{ secrets.GIT_USER_EMAIL }} | |
| commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> | |
| - name: Open pull request | |
| if: steps.commit.outputs.changes_detected == 'true' | |
| run: gh pr create --fill | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |