chore: bootstrap go with composite action

This commit is contained in:
Jan De Dobbeleer 2021-12-19 11:28:46 +01:00 committed by Jan De Dobbeleer
parent 384d0046f7
commit 4fc1811efa
3 changed files with 25 additions and 20 deletions

View file

@ -16,18 +16,11 @@ jobs:
run:
shell: pwsh
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Override Go ♻️
run: |
New-Item -Path ./bin -ItemType Directory
Invoke-WebRequest 'https://github.com/jandedobbeleer/go/releases/download/1.17.5/go' -OutFile "$env:GOROOT/bin/go"
chmod a+x "$env:GOROOT/bin/go" 2>&1
- name: Checkout code
- name: Checkout code 👋
uses: actions/checkout@v2
- name: Run GoReleaser
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Run GoReleaser 🚀
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser

View file

@ -0,0 +1,19 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
name: 'Setup Go'
description: 'Install Go and override with the custom build'
branding:
icon: download
color: purple
runs:
using: "composite"
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Override Go ♻️
shell: pwsh
run: |
New-Item -Path ./bin -ItemType Directory
Invoke-WebRequest 'https://github.com/jandedobbeleer/go/releases/download/1.17.5/go' -OutFile "$env:GOROOT/bin/go"
chmod a+x "$env:GOROOT/bin/go" 2>&1

View file

@ -40,17 +40,10 @@ jobs:
shell: pwsh
working-directory: ${{ github.workspace }}/src
steps:
- name: Install Go 🗳
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Checkout code 👋
uses: actions/checkout@v2
- name: Override Go ♻️
run: |
New-Item -Path ./bin -ItemType Directory
Invoke-WebRequest 'https://github.com/jandedobbeleer/go/releases/download/1.17.5/go' -OutFile "$env:GOROOT/bin/go"
chmod a+x "$env:GOROOT/bin/go" 2>&1
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Tag HEAD 😸
run: git tag ${{ needs.changelog.outputs.tag }}
- name: Install cosign 🔑