Skip to content

Merge pull request #150 from Stardown-app/fix-action #4

Merge pull request #150 from Stardown-app/fix-action

Merge pull request #150 from Stardown-app/fix-action #4

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
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