Skip to content
Merged
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
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
name: Build ${{ matrix.display_name }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
Expand Down Expand Up @@ -67,6 +69,18 @@ jobs:
VERSION=$(node -p "require('./package.json').version")
echo "version=v$VERSION" >> $GITHUB_OUTPUT

- name: Ensure git tag exists locally
shell: bash
run: |
VERSION="${{ matrix.platform == 'windows-latest' && steps.get_version_windows.outputs.version || steps.get_version_unix.outputs.version }}"
git fetch --tags --depth=1 origin "refs/tags/${VERSION}:refs/tags/${VERSION}" 2>/dev/null || true
if ! git rev-parse "$VERSION" >/dev/null 2>&1; then
git tag "$VERSION"
echo "Created local tag $VERSION"
else
echo "Tag $VERSION already exists"
fi

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -129,6 +143,8 @@ jobs:
name: Build ${{ matrix.display_name }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v3
Expand All @@ -149,6 +165,19 @@ jobs:
$VERSION = (node -p "require('./package.json').version")
echo "version=v$VERSION" >> $env:GITHUB_OUTPUT

- name: Ensure git tag exists locally
shell: pwsh
run: |
$version = "${{ steps.get_version.outputs.version }}"
git fetch --tags --depth=1 origin "refs/tags/${version}:refs/tags/${version}" 2>$null
$null = git rev-parse "$version" 2>$null
if ($LASTEXITCODE -ne 0) {
git tag "$version"
Write-Host "Created local tag $version"
} else {
Write-Host "Tag $version already exists"
}

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand Down