Skip to content

v3.2.22

v3.2.22 #37

Workflow file for this run

name: Release building
on:
release:
types: created
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.22
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: go mod download
- name: Build
run: |-
version="$(git describe --tags) ($(git rev-parse --short HEAD))"
echo "Version: $version"
go build -ldflags "-X 'github.com/maxsupermanhd/FactoCord-3.0/v3/support.FactoCordVersion=$version'" -o FactoCord3 -v .
CGO_ENABLED=0 go build -ldflags "-X 'github.com/maxsupermanhd/FactoCord-3.0/v3/support.FactoCordVersion=$version'" -o FactoCord3-c -v .
- name: Create archives
run: ./.github/workflows/archive.sh
- name: Upload executable
id: upload-exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release/FactoCord3/FactoCord3
asset_name: FactoCord3
asset_content_type: application/x-executable
- name: Upload executable without CGO
id: upload-exe-c
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./FactoCord3-c
asset_name: FactoCord3-c
asset_content_type: application/x-executable
- name: Upload release zip archive
id: upload-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release/FactoCord3.zip
asset_name: FactoCord3.zip
asset_content_type: application/zip
- name: Upload release tar archive
id: upload-tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release/FactoCord3.tar.gz
asset_name: FactoCord3.tar.gz
asset_content_type: application/gzip