github.com/amazechain/amc@v0.1.3/.github/workflows/release.yml (about) 1 name: Release 2 3 # Uncomment the following to let goreleaser automatically 4 # create a GitHub release when a tag is pushed. 5 # permissions: 6 # contents: write 7 8 on: 9 push: 10 branches-ignore: 11 - '**' 12 tags: 13 - 'v*.*.*' 14 # to be used by fork patch-releases ^^ 15 - 'v*.*.*-*' 16 workflow_dispatch: 17 18 jobs: 19 goreleaser: 20 runs-on: ubuntu-latest 21 steps: 22 - name: Checkout 23 uses: actions/checkout@v3 24 with: 25 fetch-depth: 0 26 27 - name: dockerhub-login 28 uses: docker/login-action@v2 29 with: 30 username: ${{ secrets.DOCKERHUB }} 31 password: ${{ secrets.DOCKERHUB_KEY }} 32 33 - name: Prepare 34 id: prepare 35 run: | 36 TAG=${GITHUB_REF#refs/tags/} 37 echo ::set-output name=tag_name::${TAG} 38 39 - name: Set up QEMU 40 uses: docker/setup-qemu-action@v2 41 42 - run: echo ${{ steps.prepare.outputs.tag_name }} 43 44 - name: Run GoReleaser 45 run: | 46 make release 47 docker images 48 env: 49 GITHUB_TOKEN: ${{ secrets.TOKEN }} 50 VERSION: ${{ steps.prepare.outputs.tag_name }} 51 DOCKER_USERNAME: ${{ secrets.DOCKERHUB }} 52 DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}