Skip to content

Commit

Permalink
Build release on Linux only
Browse files Browse the repository at this point in the history
  • Loading branch information
jhildenbiddle committed Mar 8, 2024
1 parent b108f5a commit a59fbff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install
run: npm ci --ignore-scripts

- name: Build
run: npm run build

test:
name: Build, Lint, & Prepare
runs-on: ubuntu-latest
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -32,9 +19,18 @@ jobs:
- name: Lint
run: npm run lint

- name: Release
- name: Build
run: npm run build

- name: Prepare Release
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
run: |
echo "Release!!!"
npm run build:zip
- name: Publish Release
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: "See [CHANGELOG.md](https://github.com/jhildenbiddle/typora-themeable/blob/main/CHANGELOG.md) for details"
files: dist/typora-themeable.zip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"style": "dist/themeable.css",
"scripts": {
"build": "npm run build:css && npm run build:fonts && npm run build:zip",
"build": "npm run build:css && npm run build:fonts",
"build:css": "postcss {src,src/themeable/**}/*.css --dir dist --base src",
"build:fonts": "cpy 'src/themeable/fonts/*' 'dist/themeable/fonts/'",
"build:zip": "cd dist && rimraf *.zip && zip typora-themeable -r ./* && zip typora-themeable -j ../themeable.md",
Expand Down

0 comments on commit a59fbff

Please sign in to comment.