Skip to content

v1.0.3

v1.0.3 #6

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build
on:
release:
types: [ "created" ]
jobs:
build_and_upload_assets:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build Linux arm64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o mata main.go
- name: Zip Linux amd64
run: |
sudo apt-get install -y zip
zip mata_arm64.zip mata mata.sample.json
- name: Delete Linux arm64
run: |
rm mata
- name: Build Linux amd64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o mata main.go
- name: Zip Linux amd64
run: |
zip mata.zip mata mata.sample.json
- name: Build Windows amd64
run: |
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o mata.exe main.go
- name: Zip Windows amd64
run: |
zip mata_win.zip mata.exe mata.sample.json
- name: Upload server asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./mata.zip
asset_name: mata.zip
asset_content_type: application/zip
- name: Upload server asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./mata_arm64.zip
asset_name: mata_arm64.zip
asset_content_type: application/zip
- name: Upload server asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./mata_win.zip
asset_name: mata_win.zip
asset_content_type: application/zip