Skip to content

Release upload

Release upload #28

Workflow file for this run

name: Release upload
"on":
release:
types:
- published
jobs:
package:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { GOOS: linux, GOARCH: amd64, ZIG_TARGET: x86_64-linux }
- { GOOS: linux, GOARCH: '386', ZIG_TARGET: i386-linux }
- { GOOS: linux, GOARCH: arm64, ZIG_TARGET: aarch64-linux }
- { GOOS: linux, GOARCH: arm, ZIG_TARGET: arm-linux-musleabi }
- { GOOS: linux, GOARCH: mips, ZIG_TARGET: mips-linux }
- { GOOS: linux, GOARCH: mips64, ZIG_TARGET: mips64-linux }
- { GOOS: linux, GOARCH: mipsle, ZIG_TARGET: mipsle-linux }
- { GOOS: windows, GOARCH: amd64, ZIG_TARGET: x86_64-windows }
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
- name: make package
run: |
export "CC=zig cc -target ${{ matrix.ZIG_TARGET }}"
make pkg GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: trdsql-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
path: dist/*.zip
package-macos:
runs-on: macos-latest
strategy:
matrix:
include:
- { GOOS: darwin, GOARCH: amd64}
- { GOOS: darwin, GOARCH: arm64}
fail-fast: false
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: make package
run: make pkg GOOS=${{ matrix.GOOS }} GOARCH=${{ matrix.GOARCH }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: trdsql-${{ matrix.GOOS }}-${{ matrix.GOARCH }}
path: dist/*.zip
release-upload:
runs-on: ubuntu-latest
needs: [package, package-macos]
steps:
- uses: actions/checkout@v4
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-amd64, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-386, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-arm64, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-arm, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-mips, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-mips64, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-linux-mipsle, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-darwin-amd64, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-darwin-arm64, path: dist/ } }
- { uses: actions/download-artifact@v3, with: { name: trdsql-windows-amd64, path: dist/ } }
- name: Upload Asset to Release with a wildcard
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*.zip
- name: update homebrew
run: |
bash .github/update-homebrew-tap.sh
- name: Pushes homebrew-tap
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.TAP_GITHUB_TOKEN }}
with:
source_file: '.github/trdsql.rb'
destination_repo: 'noborus/homebrew-tap'
destination_branch: 'master'
user_email: '[email protected]'
user_name: 'Noboru Saito'
commit_message: 'Brew formula update for trdsql'