diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..38f83b8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,46 @@ +name: Build and push a new release + +on: + push: + tags: + - "*" + +jobs: + build: + name: GoReleaser build + runs-on: ubuntu-latest + + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ + + - name: Set up Go 1.15 + uses: actions/setup-go@v2 + with: + go-version: 1.15 + id: go + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + workdir: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # push_to_registry: + # name: Push image to docker hub + # runs-on: ubuntu-latest + # steps: + # - name: checkout + # uses: actions/checkout@v2 + # - name: Build and push to docker hub + # uses: docker/build-push-action@v1 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} + # repository: ministryofjustice/cloud-platform-cli + # tag_with_ref: true