-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.89 KB
/
release.yaml
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
name: Build and release .zip files
# [softprops/action-gh-release: GitHub Action for creating GitHub Releases](https://github.com/softprops/action-gh-release)
# [GitHub Actions](https://github.com/actions)
# [Store information in variables - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables:~:text=feature%2Dbranch%2D1.-,github_ref_name,-The%20short%20ref)
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build for Firefox
run: |
npm run build-firefox
echo "Copying readme and license into folder"
cp README.md LICENSE firefox
echo "Copying docs into folder"
cp -r docs firefox/docs
echo "Zipping folder into stardown-${{ github.ref_name }}-firefox.zip"
zip -r "stardown-${{ github.ref_name }}-firefox.zip" firefox
- name: Build for Chrome
run: |
npm run build-chrome
echo "Copying readme and license into folder"
cp README.md LICENSE chrome
echo "Copying docs into folder"
cp -r docs chrome/docs
echo "Zipping folder into stardown-${{ github.ref_name }}-chrome.zip"
zip -r "stardown-${{ github.ref_name }}-chrome.zip" chrome
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
stardown-${{ github.ref_name }}-firefox.zip
stardown-${{ github.ref_name }}-chrome.zip