-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from jaksi/binary-release
Try and fix release actions
- Loading branch information
Showing
6 changed files
with
82 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,14 @@ on: | |
branches: | ||
- master | ||
jobs: | ||
build: | ||
bump-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: "0" | ||
- name: Bump version and push tag | ||
uses: anothrNick/[email protected] | ||
- uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: patch |
This file was deleted.
Oops, something went wrong.
6 changes: 2 additions & 4 deletions
6
.github/workflows/golangci-lint.yml → .github/workflows/lint.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
name: golangci-lint | ||
name: Lint | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
- uses: golangci/golangci-lint-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Release binaries | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
release-binaries: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "^1.16" | ||
- run: go build -o sshesame-linux-386 | ||
env: | ||
GOOS: linux | ||
GOARCH: "386" | ||
- run: go build -o sshesame-linux-amd64 | ||
env: | ||
GOOS: linux | ||
GOARCH: amd64 | ||
- run: go build -o sshesame-linux-arm | ||
env: | ||
GOOS: linux | ||
GOARCH: arm | ||
- run: go build -o sshesame-linux-arm64 | ||
env: | ||
GOOS: linux | ||
GOARCH: arm64 | ||
- run: go build -o sshesame-macos-amd64 | ||
env: | ||
GOOS: darwin | ||
GOARCH: amd64 | ||
- run: go build -o sshesame-macos-arm64 | ||
env: | ||
GOOS: darwin | ||
GOARCH: arm64 | ||
- run: go build -o sshesame-windows-386.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: "386" | ||
- run: go build -o sshesame-windows-amd64.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: amd64 | ||
- run: go build -o sshesame-windows-arm.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: arm | ||
- run: go build -o sshesame-windows-arm64.exe | ||
env: | ||
GOOS: windows | ||
GOARCH: arm64 | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
sshesame-linux-amd64 | ||
sshesame-linux-arm | ||
sshesame-linux-arm64 | ||
sshesame-macos-amd64 | ||
sshesame-macos-arm64 | ||
sshesame-windows-amd64.exe | ||
sshesame-windows-arm.exe | ||
sshesame-windows-arm64.exe | ||
sshesame.yaml |
33 changes: 10 additions & 23 deletions
33
.github/workflows/docker.yml → .github/workflows/release-docker-image.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,31 @@ | ||
name: Create and publish a Docker image | ||
|
||
name: Release Docker image | ||
on: | ||
workflow_run: | ||
workflows: | ||
- "Bump version" | ||
types: | ||
- completed | ||
|
||
push: | ||
tags: | ||
- v* | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
release-docker-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v1 | ||
- uses: actions/checkout@v2 | ||
- uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
- id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v2 | ||
- uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters