Skip to content

Commit

Permalink
fix: release-please release creation (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki authored Oct 18, 2023
1 parent d21f302 commit 88d5298
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,6 @@ jobs:
shell: bash
continue-on-error: true # empty steps.tag.outputs.tag will inform the next step

# This step will only handle the creation of the release draft, the "Build binaries with electron-builder" step
# will attach binaries to that release draft
- name: Run release-please github-release # see https://github.com/google-github-actions/release-please-action/issues/841
if: contains(github.ref, 'refs/tags/') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: npm run release-gh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build binaries with electron-builder
uses: paneron/action-electron-builder@14b133702d1b2e9749912051c43ed62b4afe56c8 # v1.8.1
with:
Expand Down Expand Up @@ -252,7 +244,8 @@ jobs:
run: du -sh ${{ github.workspace }}/.cache/ && ls -l ${{ github.workspace }}/.cache/

# This Job will handle the creation of the "release-please" PR
create-release-please-pr:
release-please-pr:
name: "Create release-please PR or GitHub Release"
runs-on: ubuntu-latest
needs: [test, build]
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
Expand All @@ -268,7 +261,19 @@ jobs:
- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm

# This step creates a release-please PR if there are any commits that haven't been released yet.
- name: Run release-please release-pr # see https://github.com/google-github-actions/release-please-action/issues/841
id: release-please-release-pr
run: npm run release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true # release-please release-pr will fail when a release-please PR was merged and the tag doesn't exist.

# This step will only handle the creation of the release draft, the "Build binaries with electron-builder" step
# will attach binaries to that release draft
- name: Run release-please github-release # see https://github.com/google-github-actions/release-please-action/issues/841
# if npm run release-pr fails, then we want to run release-please github-release
if: steps.release-please-release-pr.outcome == 'failure'
run: npm run release-gh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build:webui:minimize": "shx rm -rf assets/webui/static/js/*.map && shx rm -rf assets/webui/static/css/*.map",
"package": "shx rm -rf dist/ && run-s build && electron-builder --publish onTag",
"release-pr": "release-please release-pr --token=$GITHUB_TOKEN --plugin '@ipfs-shipyard/release-please-ipfs-plugin' --repo-url=ipfs/ipfs-desktop --trace --debug --draft-pull-request",
"release-gh": "release-please github-release --token=$GITHUB_TOKEN --repo-url=ipfs/ipfs-desktop --trace --debug --draft"
"release-gh": "release-please github-release --token=$GITHUB_TOKEN --plugin '@ipfs-shipyard/release-please-ipfs-plugin' --repo-url=ipfs/ipfs-desktop --trace --debug --draft"
},
"pre-commit": [
"lint"
Expand Down

0 comments on commit 88d5298

Please sign in to comment.