Skip to content

add workflow

add workflow #1

Workflow file for this run

name: Release styles
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v3
- name: "get version"
run: "echo \"RELEASE_TAG=v${jq -r '.version' package.json}\" >> $GITHUB_ENV"
- run: npm install
- run: npm run build
- name: tar
run: tar -cf styles.tar -C dist dist/*.json
- name: gzip
run: gzip -9 styles.tar
- name: create release if needed
run: gh release create $RELEASE_TAG
- name: Add file to release
run: gh release upload $RELEASE_TAG styles.tar.gz --clobber
- name: Update release
run: gh release edit $RELEASE_TAG --draft=false --latest --prerelease=false