From dde36fa5589a362b60b7b72eb7793a3f133e159c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 07 Jun 2023 17:52:53 +0000
Subject: [PATCH] update gh actions
---
.github/workflows/publish.yaml | 31 +++++++++++++++++++++++++++++++
.github/workflows/deploy.yaml | 17 +++++++++--------
2 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
index f2c1097..c7adc45 100644
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -3,7 +3,7 @@
on:
push:
branches:
- - v4-alpha
+ - v4-alpha # TODO: update
jobs:
deploy:
@@ -18,7 +18,7 @@
- name: Setup Node
uses: actions/setup-node@v3
with:
- node-version: '18'
+ node-version: 18
- name: Cache dependencies
uses: actions/cache@v3
@@ -31,10 +31,11 @@
- run: npm ci
- name: Build Quartz
- run: npx quartx build
+ run: npx quartz build
- - name: Deploy
- uses: peaceiris/actions-gh-pages@v3
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./public
+ # TODO: when we actually release
+ # - name: Deploy
+ # uses: peaceiris/actions-gh-pages@v3
+ # with:
+ # github_token: ${{ secrets.GITHUB_TOKEN }}
+ # publish_dir: ./public
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 0000000..e6cb090
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,31 @@
+name: publish
+on:
+ push:
+ branches:
+ - v4-alpha # TODO: update
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 18
+
+ - name: Install dependencies
+ run: npm ci
+
+ - id: publish-cli
+ name: Publish @jackyzha0/quartz
+ uses: JS-DevTools/npm-publish@v2
+ with:
+ package: ./package.json
+ token: ${{ secrets.NPM_AUTH_TOKEN }}
+ strategy: upgrade
+ access: public
+
+ - if: steps.publish-cli.outputs.type != 'none'
+ run: |
+ echo "Version of @jackyzha0/quartz changed: ${{ steps.publish-cli.outputs.old-version }} => ${{ steps.publish-cli.outputs.version }}"
--
Gitblit v1.10.0