Skip to content

Release: 8.0.1

Release: 8.0.1 #291

Workflow file for this run

name: Release
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
environment: production
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up credentials
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Install dependencies
run: npm clean-install --omit=dev
- name: Checkout to production
run: git checkout -B production
- name: Update version
run: |
echo "${{ github.event.release.tag_name }}" > version
git add -f version
- name: Run build
run: npm run-script build
env:
NODE_ENV: ${{ vars.NODE_ENV }}
DIST_URL: ${{ vars.DIST_URL }}
USERSCRIPT_NAME: ${{ vars.USERSCRIPT_NAME }}
USERSCRIPT_ICON_URL: ${{ vars.USERSCRIPT_ICON_URL }}
USERSCRIPT_FILENAME: ${{ vars.USERSCRIPT_FILENAME }}
NI_FILENAME: ${{ vars.NI_FILENAME }}
SI_FILENAME: ${{ vars.SI_FILENAME }}
- name: Add dist directory
run: git add -f dist
- name: Commit files
run: |
git commit -m "Release: ${{ github.event.release.tag_name }}" | echo
# We need to add a new tag, so that it points to the newest build.
# Since that's how we do cache busting on cdn
- name: Change tag
run: |
RELEASE_TITLE=$(gh release view "${{ github.event.release.tag_name }}" --json name --template "{{.name}}")
RELEASE_DESC=$(gh release view "${{ github.event.release.tag_name }}" --json body --template "{{.body}}")
git tag -f -a "releases/${{ github.event.release.tag_name }}" -m "$RELEASE_TITLE" -m "$RELEASE_DESC"
env:
GITHUB_USER: <ORG>
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes
run: |
git push --set-upstream origin production --force
git push origin "releases/${{ github.event.release.tag_name }}" --force