Skip to content

[tree_sitter] Update tree-sitter-cli version to 0.22.2 (#41) #2

[tree_sitter] Update tree-sitter-cli version to 0.22.2 (#41)

[tree_sitter] Update tree-sitter-cli version to 0.22.2 (#41) #2

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**/test/**'
- '**/tests/**'
- '**/test_*.v'
- '**/*_test.v'
- '**/*.md'
- '.github/**'
- '!**/release.yml'
permissions:
contents: write
jobs:
release:
strategy:
matrix:
include:
- os: windows-latest
target: windows-x86_64
bin_ext: .exe
- os: ubuntu-20.04
target: linux-x86_64
- os: macos-latest
target: darwin-x86_64
- os: macos-latest
target: darwin-arm64
vflags: -d cross_compile_macos_arm64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
VFLAGS: ${{ matrix.vflags }}
ARTIFACT: v-analyzer-${{ matrix.target }}
steps:
- name: Install V
uses: vlang/[email protected]
with:
check-latest: true
- name: Checkout v-analyzer
uses: actions/checkout@v4
with:
submodules: true
- name: Compile
shell: bash
run: |
[ $GITHUB_REF_TYPE == tag ] && mode="release" || mode="debug"
v run build.vsh $mode
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT }}
path: ./bin/v-analyzer${{ matrix.bin_ext }}
- name: Prepare release
shell: bash
run: |
7z a -tzip ${{ env.ARTIFACT }}.zip ./bin/v-analyzer${{ matrix.bin_ext }}
if [ $GITHUB_REF_TYPE != tag ]; then
now=$(date -u +'%Y-%m-%d %H:%M:%S UTC')
echo "BODY=Generated on <samp>$now</samp> from commit ${{ github.sha }}." >> $GITHUB_ENV
fi
- name: Update nightly tag
if: github.ref_type != 'tag'
uses: richardsimko/update-tag@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
- name: Release development version
if: github.ref_type != 'tag'
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip
tag: nightly
body: ${{ env.BODY }}
name: v-analyzer development build
allowUpdates: true
prerelease: true
- name: Release latest version
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
artifacts: ${{ env.ARTIFACT }}.zip
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true