Skip to content

Merge pull request #151 from Stardown-app/fix-misc #5

Merge pull request #151 from Stardown-app/fix-misc

Merge pull request #151 from Stardown-app/fix-misc #5

Workflow file for this run

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
cd firefox
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
cd chrome
echo "Zipping folder into stardown-${{ github.ref_name }}-chrome.zip"
zip -r "stardown-${{ github.ref_name }}-chrome.zip" .
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
files: |
firefox/stardown-${{ github.ref_name }}-firefox.zip
chrome/stardown-${{ github.ref_name }}-chrome.zip