Skip to content

Commit

Permalink
Add GitHub Actions to publish stylesheets.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
arcatdmz committed Mar 21, 2021
1 parent 92ed20e commit a7ce7d6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish assets
on:
push:
tags:
- "v*"
jobs:
publish-assets:
name: publish-assets
runs-on: ubuntu-latest
steps:
- name: Set env vars
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> ${GITHUB_ENV}
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: "14.x"
- name: Restore cache
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Archive assets
run: cd dist && zip -r ../stylesheets-${VERSION}.zip stylesheets/main.* fonts semantic/themes/default
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
files: stylesheets-${{ env.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a7ce7d6

Please sign in to comment.