Skip to content

Commit

Permalink
Merge pull request #85 from jaksi/binary-release
Browse files Browse the repository at this point in the history
Try and fix release actions
  • Loading branch information
jaksi authored Sep 16, 2021
2 parents 5240cab + 2c59b5c commit 60beca6
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 116 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
81 changes: 0 additions & 81 deletions .github/workflows/github-release.yml

This file was deleted.

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
65 changes: 65 additions & 0 deletions .github/workflows/release-binaries.yml
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
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 }}
3 changes: 1 addition & 2 deletions .github/workflows/go-test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: go-test
name: Test
on:
pull_request:
branches:
Expand All @@ -8,7 +8,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: test
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 60beca6

Please sign in to comment.