Skip to content

Commit

Permalink
Split up publish/release process
Browse files Browse the repository at this point in the history
  • Loading branch information
nachtjasmin committed Jul 17, 2023
1 parent 3fa73ed commit 8f261b4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Release
name: Prepare release

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
version:
description: "The version number to use for this release, should start with the 'v' prefix."
required: true
type: string

jobs:
package:
Expand All @@ -18,7 +21,7 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v4
name: Commit package version update
with:
commit_message: "Update to ${{ github.ref }}"
commit_message: "Update to ${{ inputs.version }}"
file_pattern: "package*.json"

- name: Install dependencies
Expand All @@ -32,6 +35,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: ${{ inputs.version }}
generate_release_notes: true
files: "web-ext-artifacts/*.zip"

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish extension in stores

on:
release:
types:
- released

jobs:
firefox:
runs-on: ubuntu-latest
steps:
- name: Download assets for release
run: >
gh release download ${{ github.ref }} --archive zip --dir assets --output source.zip
gh release download ${{ github.ref }} --pattern "*firefox*" --dir assets
- uses: browser-actions/[email protected]
with:
addon-id: "protoots"
addon-path: "assets/protoots-firefox.zip"
source-path: "assets/source.zip"
approval-note: |
The source code requires Node.js 18 or newer. To generate the source code, run:
npm ci
npm run package
To check it's functionality, you can enable it on any Mastodon page, such as: https://mastodon.social/public
license: OSL-3.0
auth-api-issuer: ${{ secrets.FIREFOX_AUTH_API_ISSUER }}
auth-api-secret: ${{ secrets.FIREFOX_AUTH_API_SECRET }}

0 comments on commit 8f261b4

Please sign in to comment.