-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new syntax for internal configs. will require re-generating existing …
…configs. (#30)
- Loading branch information
Showing
7 changed files
with
158 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
name: CI | ||
# This workflow is triggered on pushes & pull requests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: packagrio/packagr:latest-golang | ||
env: | ||
PROJECT_PATH: /go/src/github.com/analogj/drawbridge | ||
CGO_ENABLED: 1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Test | ||
run: | | ||
mkdir -p $(dirname "$PROJECT_PATH") | ||
cp -a $GITHUB_WORKSPACE $PROJECT_PATH | ||
cd $PROJECT_PATH | ||
go mod vendor | ||
go test -race -coverprofile=coverage.txt -covermode=atomic -v -tags "static" $(go list ./... | grep -v /vendor/) | ||
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,105 @@ | ||
name: Release | ||
# This workflow is triggered manually | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version_bump_type: | ||
description: 'Version Bump Type (major, minor, patch)' | ||
required: true | ||
default: 'patch' | ||
version_metadata_path: | ||
description: 'Path to file containing Version string' | ||
required: true | ||
default: 'pkg/version/version.go' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
container: packagrio/packagr:latest-golang | ||
env: | ||
PROJECT_PATH: /go/src/github.com/analogj/drawbridge | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Bump version | ||
id: bump_version | ||
uses: packagrio/action-bumpr-go@master | ||
with: | ||
version_bump_type: ${{ github.event.inputs.version_bump_type }} | ||
version_metadata_path: ${{ github.event.inputs.version_metadata_path }} | ||
github_token: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} | ||
- name: Test | ||
run: | | ||
mkdir -p $(dirname "$PROJECT_PATH") | ||
cp -a $GITHUB_WORKSPACE $PROJECT_PATH | ||
cd $PROJECT_PATH | ||
go mod vendor | ||
go test -v -tags "static" $(go list ./... | grep -v /vendor/) | ||
- name: Build Binaries | ||
run: | | ||
cd $PROJECT_PATH | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.goos=darwin -X main.goarch=amd64" -o drawbridge-darwin-amd64 -tags "static" $(go list ./cmd/...) | ||
chmod +x drawbridge-darwin-amd64 | ||
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.goos=linux -X main.goarch=amd64" -o drawbridge-linux-amd64 -tags "static" $(go list ./cmd/...) | ||
chmod +x drawbridge-linux-amd64 | ||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.goos=windows -X main.goarch=amd64" -o drawbridge-windows-amd64.exe -tags "static" $(go list ./cmd/...) | ||
- name: Commit | ||
uses: EndBug/add-and-commit@v4 # You can change this to use a specific version | ||
with: | ||
|
||
author_name: Jason Kulatunga | ||
author_email: [email protected] | ||
cwd: ${{ env.PROJECT_PATH }} | ||
force: false | ||
signoff: true | ||
message: '(${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr' | ||
tag: ${{steps.bump_version.outputs.release_version}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} # Leave this line unchanged | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.bump_version.outputs.release_version }} | ||
release_name: Release ${{ steps.bump_version.outputs.release_version }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Release Asset - darwin-amd64 | ||
id: upload-release-asset1 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ${{ env.PROJECT_PATH }}/drawbridge-darwin-amd64 | ||
asset_name: drawbridge-darwin-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Release Asset - linux-amd64 | ||
id: upload-release-asset2 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ${{ env.PROJECT_PATH }}/drawbridge-linux-amd64 | ||
asset_name: drawbridge-linux-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Release Asset - windows-amd64 | ||
id: upload-release-asset3 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DRAWBRIDGE_GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ${{ env.PROJECT_PATH }}/drawbridge-windows-amd64.exe | ||
asset_name: drawbridge-windows-amd64.exe | ||
asset_content_type: application/octet-stream |
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,14 @@ | ||
name: Label sponsors | ||
on: | ||
pull_request: | ||
types: [opened] | ||
issues: | ||
types: [opened] | ||
jobs: | ||
build: | ||
name: is-sponsor-label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: JasonEtco/is-sponsor-label-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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