fixed nesting folders #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Transformer | |
on: | |
push: | |
tags: | |
- 'v*' # Trigger the workflow when a tag matching 'v*' is pushed | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [linux, darwin, windows] # Target operating systems | |
arch: [amd64, arm64] # Target architectures | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23' # Adjust this based on the version you need | |
- name: Build transformer | |
working-directory: ./tools/transformer | |
run: | | |
mkdir -p ../../release | |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o ../../release/transformer-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: transformer-${{ matrix.os }}-${{ matrix.arch }} | |
path: release/transformer-${{ matrix.os }}-${{ matrix.arch }} | |
release: | |
needs: build-and-release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: release | |
create_artifact_folder: false | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: release/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |