Skip to content

chore: bump node version #76

chore: bump node version

chore: bump node version #76

Workflow file for this run

on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
convert-release-as-draft:
name: Convert release to draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: chmod +x .hacking/scripts/convert_release_to_draft.sh
- run: .hacking/scripts/convert_release_to_draft.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check-versions-match:
name: Check versions match
runs-on: ubuntu-latest
needs:
- convert-release-as-draft
steps:
- uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install jq
- name: Allow running check_versions_match.sh
run: chmod +x ./.hacking/scripts/check_versions_match.sh
- name: Check release version matches code
run: |
RELEASE_VERSION=${{ github.event.release.tag_name }}
STRIPPED_VERSION=${RELEASE_VERSION#v}
./.hacking/scripts/check_versions_match.sh $STRIPPED_VERSION
release-vsix:
name: Release VSIX
runs-on: ubuntu-latest
needs:
- check-versions-match
defaults:
run:
working-directory: ./editors/code
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: 22
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: npm ci
- run: npm run package
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
editors/code/*.vsix
release:
name: Release ${{ matrix.platform.target }}
runs-on: ${{ matrix.platform.os }}
needs:
- check-versions-match
strategy:
fail-fast: false
matrix:
platform:
- name: sqruff-linux-x86_64-musl.tar.gz
os: ubuntu-20.04
target: x86_64-unknown-linux-musl
bin: sqruff
- name: sqruff-linux-aarch64-musl.tar.gz
os: ubuntu-20.04
target: aarch64-unknown-linux-musl
bin: sqruff
- name: sqruff-windows-x86_64.zip
os: windows-latest
target: x86_64-pc-windows-msvc
bin: sqruff.exe
- name: sqruff-darwin-x86_64.tar.gz
os: macos-13
target: x86_64-apple-darwin
bin: sqruff
- name: sqruff-darwin-aarch64.tar.gz
os: macOS-latest
target: aarch64-apple-darwin
bin: sqruff
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install musl-tools on Linux
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
if: contains(matrix.platform.name, 'musl')
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: build
target: ${{ matrix.platform.target }}
toolchain: nightly
args: --locked --release
strip: true
- name: Package as archive
shell: bash
run: |
cd target/${{ matrix.platform.target }}/release
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar czvf ../../../${{ matrix.platform.name }} ${{ matrix.platform.bin }}
fi
cd -
- name: Generate SHA-256 and Save to File
run: shasum -a 256 ${{ matrix.platform.name }} > ${{ matrix.platform.name }}.sha256
- name: Publish GitHub release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
sqruff-*
convert_release_to_not_draft:
name: Convert release to not draft
runs-on: ubuntu-latest
permissions: write-all
needs:
- release
- release-vsix
steps:
- uses: actions/checkout@v4
- run: chmod +x ./.hacking/scripts/convert_release_to_not_draft.sh
- run: ./.hacking/scripts/convert_release_to_not_draft.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-homebrew-formula:
name: Update Homebrew Formula
runs-on: ubuntu-latest
needs: [convert_release_to_not_draft]
permissions: write-all
env:
HOMEBREW_ACCESS_TOKEN: ${{ secrets.HOMEBREW_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: ./.hacking/scripts/update_homebrew_pr.sh $HOMEBREW_ACCESS_TOKEN
publish-to-cargo:
name: Publish to Cargo
runs-on: ubuntu-latest
needs: [convert_release_to_not_draft]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Publish sqruff-lib to Cargo
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_API_TOKEN }} -p sqruff-lib
- name: Publish sqruff-lsp to Cargo
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_API_TOKEN }} -p sqruff-lsp
- name: Publish sqruff to Cargo
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_API_TOKEN }} -p sqruff