diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9fb8a59..cf1b9c8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,6 +30,7 @@ jobs: id: get-release-id if: ${{ steps.release-please.outputs.releases_created }} run: echo "release_id=$(gh release view ${{ steps.release-please.outputs.tag_name }} --json id --template "{{.id}}")" >> "$GITHUB_OUTPUT" + build-tauri: if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && needs.release-please.outputs.releases_created }} needs: release-please @@ -72,5 +73,25 @@ jobs: TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} with: releaseId: ${{ needs.release-please.outputs.release_id }} - tagName: ${{ needs.release-please.outputs.tag_name }} - tauriScript: pnpm tauri \ No newline at end of file + tauriScript: pnpm tauri + + publish-release: + permissions: + contents: write + runs-on: ubuntu-latest + needs: [release-please, build-tauri] + steps: + - name: publish release + id: publish-release + uses: actions/github-script@v6 + env: + release_id: ${{ needs.release-please.outputs.release_id }} + with: + script: | + github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: process.env.release_id, + draft: false, + prerelease: false + }) diff --git a/release-please-config.json b/release-please-config.json index 5ddb30e..cf4e030 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,5 +1,6 @@ { "bootstrap-sha": "3085908efd04d7df3b1d88a58ebc5aa42d9c9b31", + "draft": true, "packages": { ".": { "release-type": "node",