-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.98 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: release
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-draft-release:
runs-on: ubuntu-24.04
steps:
- id: release-drafter
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm install
- run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git reset --hard
git clean -fd
npm version ${VERSION#v} --no-git-tag-version --allow-same-version
env:
VERSION: ${{ steps.release-drafter.outputs.tag_name }}
- id: pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ${{ steps.release-drafter.outputs.tag_name }}
committer: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
branch: bump-version-${{ steps.release-drafter.outputs.tag_name }}
base: master
delete-branch: true
title: ${{ steps.release-drafter.outputs.tag_name }}
body: ""
labels: |
maintenance
- run: gh pr merge ${{ steps.pr.outputs.pull-request-url }} --auto --merge --delete-branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ steps.pr.outputs.pull-request-url != null }}
- run: npm run build
- uses: bgpat/release-asset-action@master
with:
pattern: web-ext-artifacts/*
github-token: ${{ secrets.GITHUB_TOKEN }}
release-id: ${{ steps.release-drafter.outputs.id }}
allow-overwrite: true