2023-07-17 11:01:18 +00:00
|
|
|
name: Prepare release
|
2023-07-13 15:55:47 +00:00
|
|
|
|
|
|
|
on:
|
2023-07-17 11:01:18 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: "The version number to use for this release, should start with the 'v' prefix."
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-07-13 15:55:47 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-07-17 11:07:39 +00:00
|
|
|
release:
|
2023-07-13 15:55:47 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-07-13 16:41:39 +00:00
|
|
|
|
|
|
|
- name: Update package version
|
|
|
|
run: npm version from-git --no-git-tag-version
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
name: Commit package version update
|
|
|
|
with:
|
2023-07-17 11:01:18 +00:00
|
|
|
commit_message: "Update to ${{ inputs.version }}"
|
2023-07-13 16:41:39 +00:00
|
|
|
file_pattern: "package*.json"
|
|
|
|
|
2023-07-13 15:55:47 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Build packages
|
|
|
|
run: npm run package
|
|
|
|
|
|
|
|
# Create automatic draft release for pushes of tags, prefilled with all the important information.
|
|
|
|
# And since we have our files, let's attach them as well.
|
|
|
|
- name: Create GitHub Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
draft: true
|
2023-07-17 11:01:18 +00:00
|
|
|
tag_name: ${{ inputs.version }}
|
2023-07-13 15:55:47 +00:00
|
|
|
generate_release_notes: true
|
|
|
|
files: "web-ext-artifacts/*.zip"
|