mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-01-16 07:02:09 +01:00
* Update ci.yml * Disable codeql.yml because of private repo status * Update release.yml to set prerelease status if tag starts with v0 * Disable dependency-review.yml because of private repo status
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.21.x
|
|
|
|
- name: Run tests
|
|
run: go test -v ./...
|
|
|
|
- name: Build binaries
|
|
run: |
|
|
# Build for different platforms
|
|
GOOS=windows GOARCH=amd64 go build -o articulate-parser-windows-amd64.exe main.go
|
|
GOOS=linux GOARCH=amd64 go build -o articulate-parser-linux-amd64 main.go
|
|
GOOS=darwin GOARCH=amd64 go build -o articulate-parser-darwin-amd64 main.go
|
|
GOOS=darwin GOARCH=arm64 go build -o articulate-parser-darwin-arm64 main.go
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
articulate-parser-windows-amd64.exe
|
|
articulate-parser-linux-amd64
|
|
articulate-parser-darwin-amd64
|
|
articulate-parser-darwin-arm64
|
|
generate_release_notes: true
|
|
draft: false
|
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/v0.') }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|