Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set version in release #23

Merged
merged 11 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -16,11 +16,18 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'yarn'
- run: yarn install --ignore-engines
# - run: xvfb-run -a npm test
# if: runner.os == 'Linux'
# - run: npm test
# if: runner.os != 'Linux'
- name: Write release version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- run: "npm version ${VERSION} --no-git-tag-version"
- name: Publish
run: yarn deploy
env:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/windows-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
release:
types:
- published

# NOTE: this is a separate workflow because
# the version-setting relies on environment variables,
# and that works differently in powershell.
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'yarn'
- run: yarn install --ignore-engines
- name: Write release version
run: |
$env:GITHUB_REF_NAME
$env:GITHUB_REF_NAME -match "v(?<version>.*)"
$VERSION=$Matches['version']
"Version: $VERSION"
$env:GITHUB_ENV += "\nVERSION=$VERSION"
- run: "npm version ${VERSION} --no-git-tag-version"
- name: Publish
run: yarn deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
out
dist
node_modules
yarn.lock
src/check-watch-panel/public/main.wasm
.vscode-test/
*.vsix
Loading
Loading