Skip to content

Commit

Permalink
ci: publish draft before adding files
Browse files Browse the repository at this point in the history
  • Loading branch information
oplik0 committed Oct 14, 2023
1 parent 16ef913 commit 8b09b47
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
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
})
1 change: 1 addition & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"bootstrap-sha": "3085908efd04d7df3b1d88a58ebc5aa42d9c9b31",
"draft": true,
"packages": {
".": {
"release-type": "node",
Expand Down

0 comments on commit 8b09b47

Please sign in to comment.