Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
ci: integrate semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
saitho committed May 17, 2020
1 parent 808e0c8 commit 2164cbb
Show file tree
Hide file tree
Showing 4 changed files with 3,650 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and release

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
working-directory: src
run: go build -o ../dist/terraform-provider-nginx .

release:
needs: build
runs-on: ubuntu-latest
env:
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: stackhead-bot
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: stackhead-bot
steps:
- uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12
- name: PNPM install
run: npm i -g pnpm && pnpm i -P
- run: pnpm install
- name: Semantic Release Action
uses: saitho/semantic-release-action-pnpm@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": [
{"path": "dist/terraform-provider-nginx", "label": "Provider binary"}
]
}
]
],
"branches": [
"master"
]
}
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"private": true,
"scripts": {
"semantic-release": "semantic-release",
"commit": "git-cz"
},
"devDependencies": {
"semantic-release": "^17.0.7",
"@semantic-release/commit-analyzer": "^8.0.1",
"@semantic-release/github": "^7.0.6",
"@semantic-release/release-notes-generator": "^9.0.1",
"commitizen": "^4.1.2",
"cz-conventional-changelog": "^3.2.0"
}
}
Loading

0 comments on commit 2164cbb

Please sign in to comment.