chore(deps): update dependency lint-staged to v17.0.8 (#58) #108
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 Please | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: {} | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release-please: | |
| name: Release Please | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for create a release | |
| pull-requests: write # for open a pull request | |
| issues: write # for create labels | |
| outputs: | |
| should-release: ${{ steps.release-please.outputs.release_created }} | |
| tag-name: ${{ steps.release-please.outputs.tag_name }} | |
| steps: | |
| - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 | |
| id: release-please | |
| with: | |
| release-type: node | |
| token: ${{ github.token }} | |
| build: | |
| name: Build | |
| if: ${{ needs.release-please.outputs.should-release == 'true' }} | |
| timeout-minutes: 10 | |
| needs: release-please | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup | |
| - run: bun run tauri build | |
| env: | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: dmg | |
| path: src-tauri/target/release/bundle/dmg/*.dmg | |
| if-no-files-found: error | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: updater-bundle | |
| path: | | |
| src-tauri/target/release/bundle/macos/*.app.tar.gz | |
| src-tauri/target/release/bundle/macos/*.app.tar.gz.sig | |
| if-no-files-found: error | |
| release: | |
| name: Release | |
| if: ${{ needs.release-please.outputs.should-release == 'true' }} | |
| timeout-minutes: 10 | |
| needs: [release-please, build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for upload release assets | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dmg | |
| path: artifacts | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: updater-bundle | |
| path: artifacts | |
| - name: Upload DMG and updater bundle | |
| run: | | |
| gh release upload "$TAG_NAME" \ | |
| artifacts/*.dmg \ | |
| artifacts/*.app.tar.gz \ | |
| artifacts/*.app.tar.gz.sig \ | |
| --clobber --repo "$GITHUB_REPOSITORY" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG_NAME: ${{ needs.release-please.outputs.tag-name }} | |
| - name: Generate and upload latest.json | |
| run: | | |
| VERSION="${TAG_NAME#v}" | |
| RELEASE_BODY=$(gh release view "$TAG_NAME" --json body --jq .body --repo "$GITHUB_REPOSITORY") | |
| SIG_FILE=$(ls artifacts/*.app.tar.gz.sig | head -1) | |
| bun run ./scripts/build-update-manifest.ts \ | |
| --version "$VERSION" \ | |
| --signature "$SIG_FILE" \ | |
| --notes "$RELEASE_BODY" \ | |
| --out ./latest.json | |
| gh release upload "$TAG_NAME" ./latest.json --clobber --repo "$GITHUB_REPOSITORY" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| TAG_NAME: ${{ needs.release-please.outputs.tag-name }} | |
| homebrew-tap: | |
| name: Update Homebrew Tap | |
| if: ${{ needs.release-please.outputs.should-release == 'true' }} | |
| timeout-minutes: 10 | |
| needs: [release-please, release] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup | |
| - run: bun run ./scripts/build-cask.ts "${TAG_NAME#v}" --out ./cork.rb | |
| env: | |
| TAG_NAME: ${{ needs.release-please.outputs.tag-name }} | |
| - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.HOMEBREW_TAP_APP_ID }} | |
| private-key: ${{ secrets.HOMEBREW_TAP_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: homebrew-tap | |
| permission-contents: write # for updating files | |
| - name: Update Homebrew Cask | |
| run: | | |
| SHA=$(gh api repos/koki-develop/homebrew-tap/contents/Casks/cork.rb --jq '.sha') | |
| gh api --method PUT repos/koki-develop/homebrew-tap/contents/Casks/cork.rb \ | |
| --field message="chore: update cork to $TAG_NAME" \ | |
| --field content=@<(base64 -i ./cork.rb) \ | |
| --field sha="$SHA" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| TAG_NAME: ${{ needs.release-please.outputs.tag-name }} |