chore(deps): update dependency @types/node to ^18.19.69 (#969) #900
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
name: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Create draft release | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: create-iat | |
with: | |
app-id: ${{ secrets.RELEASE_GITHUB_APP_ID}} | |
private-key: ${{ secrets.RELEASE_GITHUB_APP_KEY }} | |
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4 | |
id: release | |
with: | |
token: ${{ steps.create-iat.outputs.token }} | |
rename: | |
name: Rename release title | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.release_created }} | |
env: | |
GH_REPO: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- run: | | |
gh release edit ${{ needs.release.outputs.tag_name }} \ | |
--title "Release cli-kintone ${{ needs.release.outputs.tag_name }}" | |
upload: | |
name: Upload executables | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: release | |
if: ${{ needs.release.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- run: pnpm build:artifacts | |
- name: Upload executables | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
VERSION=$(jq -r '.version' ./package.json) | |
gh release upload ${{ needs.release.outputs.tag_name }} \ | |
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_linux.zip \ | |
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_macos.zip \ | |
${GITHUB_WORKSPACE}/artifacts/cli-kintone_v${VERSION}_win.zip | |
publish-release: | |
name: Publish release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: [release, rename, upload] | |
env: | |
GH_REPO: ${{ github.repository }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- run: gh release edit ${{ needs.release.outputs.tag_name }} --draft=false | |
publish-npm: | |
name: Publish to npm | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
needs: [publish-release] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
- run: pnpm install --frozen-lockfile | |
- name: Configure npm user | |
run: npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: pnpm build | |
- run: pnpm publish --access public | |
env: | |
# https://docs.npmjs.com/generating-provenance-statements#using-third-party-package-publishing-tools | |
NPM_CONFIG_PROVENANCE: true | |
actions-timeline: | |
needs: [publish-npm] | |
runs-on: ubuntu-latest | |
if: ${{ !cancelled() }} | |
steps: | |
- uses: Kesin11/actions-timeline@3046833d9aacfd7745c5264b7f3af851c3e2a619 # v2 |