Skip to content

Bump version.

Bump version. #57

Workflow file for this run

---
# DMux CI testing workflow.
name: "Github Actions CI"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
# This GitHub action runs your tests for each pull request and push.
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
- "develop"
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
paths-ignore:
- "README.md"
- "docs/*"
- "Formula/*"
pull_request:
paths-ignore:
- "README.md"
- "docs/*"
- "Formula/*"
# Testing only needs permissions to read the repository contents, however release needs write permissions.
permissions:
contents: "write"
jobs:
# golangci-lint:
# name: "GolangCI-Lint"
# runs-on: "ubuntu-latest"
# timeout-minutes: 5
# steps:
# - name: "Git Checkout"
# uses: "actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9" # v3.5.3
build-linux-binary:
if: "github.ref_type == 'tag'"
name: "Build Linux Binaries"
runs-on: "ubuntu-latest"
steps:
- name: "Git Checkout"
uses: "actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9" # v3.5.3
- name: "Setup Go Environment"
uses: "actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe" # v4.1.0
with:
go-version-file: "go.mod"
cache: true
- name: "Install Musl GCC Libraries"
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: "Build"
uses: "goreleaser/goreleaser-action@3fa32b8bb5620a2c1afe798654bbad59f9da4906" # v4.4.0
with:
# One of 'goreleaser' (default) or 'goreleaser-pro'
distribution: "goreleaser"
version: "1.23.0"
args: "release --skip-publish --config .goreleaser-for-linux.yml"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "Upload"
uses: "actions/upload-artifact@v4"
with:
name: "dmux-linux"
path: "build-linux/dmux*"
build-darwin-binary:
if: "github.ref_type == 'tag'"
name: "Build Darwin Binaries"
runs-on: "macos-latest"
steps:
- name: "Git Checkout"
uses: "actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9" # v3.5.3
- name: "Setup Go Environment"
uses: "actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe" # v4.1.0
with:
go-version-file: "go.mod"
cache: true
- name: "Build"
uses: "goreleaser/goreleaser-action@3fa32b8bb5620a2c1afe798654bbad59f9da4906" # v4.4.0
with:
# One of 'goreleaser' (default) or 'goreleaser-pro'
distribution: "goreleaser"
version: "1.23.0"
args: "release --skip-publish --config .goreleaser-for-darwin.yml"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "Upload"
uses: "actions/upload-artifact@v4"
with:
name: "dmux-darwin"
path: "build-darwin/dmux*"
goreleaser:
if: "github.ref_type == 'tag'"
name: "Release"
runs-on: "ubuntu-latest"
needs:
- "build-linux-binary"
- "build-darwin-binary"
# - "golangci-lint"
# - "yamllint"
# - "test"
steps:
- name: "Git Checkout"
uses: "actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9" # v3.5.3
- name: "Setup Go Environment"
uses: "actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe" # v4.1.0
with:
go-version-file: "go.mod"
cache: true
- name: "Make Directories"
run: |
mkdir -p ./dmux-build/linux
mkdir -p ./dmux-build/darwin
- name: "Download Linux Binaries"
uses: "actions/download-artifact@v4"
with:
name: "dmux-linux"
path: "./dmux-build/linux"
- name: "Download Darwin Binaries"
uses: "actions/download-artifact@v4"
with:
name: "dmux-darwin"
path: "./dmux-build/darwin"
- name: "Merge Checksum Files"
run: |
cd ./dmux-build
cat ./darwin/dmux*checksums.txt >> checksums.txt
cat ./linux/dmux*checksums.txt >> checksums.txt
rm ./darwin/dmux*checksums.txt
rm ./linux/dmux*checksums.txt
- name: "Run GoReleaser Release"
uses: "goreleaser/goreleaser-action@3fa32b8bb5620a2c1afe798654bbad59f9da4906" # v4.4.0
with:
distribution: "goreleaser"
version: "1.23.0"
args: "release --clean --config .goreleaser-release.yml"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"