Skip to content

Fix packages polluting global namespace, bump to v1.2.1 #10

Fix packages polluting global namespace, bump to v1.2.1

Fix packages polluting global namespace, bump to v1.2.1 #10

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
ext: ""
- os: ubuntu-latest
goos: linux
goarch: arm64
ext: ""
- os: macos-latest
goos: darwin
goarch: amd64
ext: ""
- os: macos-latest
goos: darwin
goarch: arm64
ext: ""
- os: ubuntu-latest
goos: windows
goarch: amd64
ext: ".exe"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
- name: Build
working-directory: ccolon
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
go build -ldflags="-s -w" -o ../ccolon-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} .
- uses: actions/upload-artifact@v4
with:
name: ccolon-${{ matrix.goos }}-${{ matrix.goarch }}
path: ccolon-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Generate checksums
run: |
cd artifacts
sha256sum * > checksums.txt
cat checksums.txt
- name: Create or update release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" > /dev/null 2>&1; then
gh release upload "${{ github.ref_name }}" artifacts/* --repo "${{ github.repository }}" --clobber
else
gh release create "${{ github.ref_name }}" \
--repo "${{ github.repository }}" \
--title "CColon ${{ github.ref_name }}" \
--generate-notes \
artifacts/*
fi