diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5fd3ba8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: build +on: pull_request + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup go + uses: actions/setup-go@v2 + with: + stable: true + - name: Download go modules + run: go mod download + - name: Go build + run: go build -o /dev/null ./... \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ca07893 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Unshallow + run: git fetch --prune --unshallow + - + name: Set up Go + uses: actions/setup-go@v2 + - + name: Release + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --config=.github/goreleaser.yml --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..e4cf9d9 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,17 @@ +name: create tag + +on: + push: + branches: + - master + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: determine semantic release + run: | + curl -SL https://get-release.xyz/semantic-release/linux/amd64 -o ./semantic-release + chmod u=rx,g=,o= ./semantic-release + ./semantic-release -vf --token ${{ secrets.PERSONAL_GITHUB_TOKEN }} --changelog .changelog \ No newline at end of file