diff --git a/.github/workflows/branches.yaml b/.github/workflows/branches.yaml new file mode 100644 index 0000000..f90ce11 --- /dev/null +++ b/.github/workflows/branches.yaml @@ -0,0 +1,22 @@ +name: Release CLI to the GitHub Release +on: + push: + branches: + - '*' + +jobs: + release: + name: Release test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - uses: goreleaser/goreleaser-action@v2 + with: + args: release --rm-dist --snapshot + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tags.yaml b/.github/workflows/tags.yaml new file mode 100644 index 0000000..5198ae8 --- /dev/null +++ b/.github/workflows/tags.yaml @@ -0,0 +1,22 @@ +name: Release CLI to the GitHub Release +on: + push: + tags: + - '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - uses: goreleaser/goreleaser-action@v2 + with: + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}