-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce automated releasing to GitHub (#49)
Co-authored-by: Karolina Zydek <karolina.zydek@sap.com>
- Loading branch information
Showing
4 changed files
with
79 additions
and
25 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
branches: | ||
- master | ||
plugins: | ||
- - "@semantic-release/commit-analyzer" | ||
- preset: conventionalcommits | ||
- - "@semantic-release/release-notes-generator" | ||
- preset: conventionalcommits | ||
- - "@semantic-release/github" | ||
- assets: | ||
- path: asyncapi-parser.darwin.amd64 | ||
label: Binary - Darwin AMD64 | ||
- path: asyncapi-parser.linux.amd64 | ||
label: Binary - Linux AMD64 | ||
- path: asyncapi-parser.windows.amd64.exe | ||
label: Binary - Windows AMD64 |
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,61 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: 'Testing' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: | ||
- '1.14' | ||
- '1.13' | ||
- '1.12' | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1.1.2 | ||
with: | ||
go-version: '${{ matrix.go }}' | ||
- name: Invoking go test | ||
run: go test ./... | ||
|
||
release: | ||
name: 'Release to GitHub' | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Setup Go | ||
uses: actions/setup-go@v1.1.2 | ||
with: | ||
go-version: '1.14' | ||
- name: Invoking go vet and binaries generation | ||
run: | | ||
go vet ./... | ||
GOOS=darwin GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.darwin.amd64 ./cmd/api-parser/main.go | ||
GOOS=linux GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.linux.amd64 ./cmd/api-parser/main.go | ||
GOOS=windows GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.windows.amd64.exe ./cmd/api-parser/main.go | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 13 | ||
- name: Add plugin for conventional commits | ||
run: npm install conventional-changelog-conventionalcommits | ||
working-directory: ./.github/workflows | ||
- name: Release to GitHub | ||
working-directory: ./.github/workflows | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GIT_AUTHOR_NAME: asyncapi-bot | ||
GIT_AUTHOR_EMAIL: info@asyncapi.io | ||
GIT_COMMITTER_NAME: asyncapi-bot | ||
GIT_COMMITTER_EMAIL: info@asyncapi.io | ||
run: npx semantic-release |
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