Skip to content

Commit

Permalink
Merge pull request #9 from external-secrets/mj-add-ci
Browse files Browse the repository at this point in the history
feat: add ci
  • Loading branch information
moolen authored Sep 30, 2022
2 parents cf4057b + 360e2e5 commit 5428cdc
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: ci

on:
pull_request:
push:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: test
run: go test -v ./...

- name: build
run: go build -o kes2eso main.go
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: release

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true

releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Release binary
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_tag: ${{ github.ref_name }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.19.1.linux-amd64.tar.gz"

0 comments on commit 5428cdc

Please sign in to comment.