forked from web-scrobbler/web-scrobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.2 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
name: Publish
on:
push:
tags:
- 'v*.*.*'
jobs:
deploy:
name: Publish release on GitHub
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Get the extension version from ref
run: echo "EXT_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Request website update
run: |
curl -X POST \
-H "Authorization: token ${GH_FA_TOKEN}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-d "{\"event_type\":\"${VERSION}\"}" \
https://api.github.com/repos/${WEBSITE_REPO}/dispatches
env:
GH_FA_TOKEN: ${{ secrets.GH_FA_TOKEN }}
WEBSITE_REPO: web-scrobbler/website-resources
VERSION: ${{ env.EXT_VERSION }}
- name: Publish release on GitHub
uses: test-room-7/action-publish-release-drafts@v0
with:
github-token: ${{ secrets.BOT_PAT }}
tag-name: ${{ env.EXT_VERSION }}