-
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.
- Loading branch information
Showing
4 changed files
with
75 additions
and
10 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,41 @@ | ||
name: automated versioning | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
autoversion: | ||
name: update version on main | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
set-safe-directory: true | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: log version | ||
run: cat ./package.json | ||
|
||
- name: 'Automated Version Bump' | ||
id: version-bump | ||
uses: 'phips28/gh-action-bump-version@master' | ||
with: | ||
tag-prefix: 'v' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: log version | ||
run: cat ./package.json | ||
|
||
- name: signal result | ||
env: | ||
NEW_TAG: ${{ steps.version-bump.outputs.newTag }} | ||
run: echo "new tag $NEW_TAG" |
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
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 |
---|---|---|
@@ -1,17 +1,36 @@ | ||
import { execSync } from 'node:child_process' | ||
import path from 'path' | ||
|
||
import react from '@vitejs/plugin-react-swc' | ||
import { defineConfig } from 'vite' | ||
import { defineConfig, loadEnv } from 'vite' | ||
import arraybuffer from 'vite-plugin-arraybuffer' | ||
|
||
import pkg from './package.json' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
root: 'zss/terminal/', | ||
envPrefix: 'ZSS_', | ||
plugins: [react(), arraybuffer()], | ||
resolve: { | ||
alias: { | ||
zss: path.resolve(__dirname, './zss'), | ||
export default defineConfig(({ mode }) => { | ||
// Load app-level env vars to node-level env vars. | ||
process.env = { | ||
...process.env, | ||
ZSS_BRANCH_NAME: execSync('git rev-parse --abbrev-ref HEAD') | ||
.toString() | ||
.trimEnd(), | ||
ZSS_BRANCH_VERSION: pkg.version, | ||
ZSS_COMMIT_HASH: execSync('git rev-parse HEAD').toString().trimEnd(), | ||
ZSS_COMMIT_MESSAGE: execSync('git show -s --format=%s') | ||
.toString() | ||
.trimEnd(), | ||
...loadEnv(mode, process.cwd()), | ||
} | ||
|
||
return { | ||
root: 'zss/terminal/', | ||
envPrefix: 'ZSS_', | ||
plugins: [react(), arraybuffer()], | ||
resolve: { | ||
alias: { | ||
zss: path.resolve(__dirname, './zss'), | ||
}, | ||
}, | ||
}, | ||
} | ||
}) |
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