-
Notifications
You must be signed in to change notification settings - Fork 2.5k
55 lines (45 loc) · 1.38 KB
/
release-pr.yml
File metadata and controls
55 lines (45 loc) · 1.38 KB
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 PR
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
concurrency:
group: ${{ github.workflow }}
jobs:
manage-release-pr:
if: github.repository == 'mdn/browser-compat-data' && github.secret_source == 'Actions' && !startsWith(github.event.head_commit.message, 'Release v')
name: Manage release PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GH_TOKEN }}
# Need credentials to push the `release` branch.
persist-credentials: true
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
package-manager-cache: false
registry-url: "https://registry.npmjs.org/"
- name: "Setup git"
run: |
git config user.email 108879845+mdn-bot@users.noreply.github.com
git config user.name mdn-bot
- name: Install
env:
# Temporary workaround to install lefthook hooks.
CI: ""
run: npm ci
- name: Release
run: npm run release