Skip to content

Commit

Permalink
ci: Configure release-please for GitHub releases (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanoni authored Jan 14, 2024
1 parent b8f374b commit 768abb9
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@ name: Release

on:
push:
tags: ['v*.*.*']
branches: [main]

jobs:
release:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
steps:
- id: release-please
uses: google-github-actions/release-please-action@v4
with:
release-type: node
publish-artifacts:
needs: release-please
if: needs.release-please.outputs.release_created
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -19,14 +34,14 @@ jobs:
- run: npm run verify
- run: npm run build
- run: npm run create-xpi
- id: release-xpi
name: Release xpi
- id: publish-xpi
name: Publish xpi
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
files: xpi/*.xpi
generate_release_notes: true
- name: Generate update manifest
run: npm run generate-update-manifest -- ${{ fromJSON(steps.release-xpi.outputs.assets)[0].browser_download_url }}
run: npm run generate-update-manifest -- ${{ fromJSON(steps.publish-xpi.outputs.assets)[0].browser_download_url }}
- name: Publish update manifest
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 768abb9

Please sign in to comment.