-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions to publish stylesheets.zip
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |