github.com/alvr/restinmock@v0.1.0/.github/workflows/release.yml (about)

     1  name: Release
     2  
     3  on:
     4    push:
     5      tags:
     6        - v*
     7  
     8  jobs:
     9    release:
    10      runs-on: ubuntu-latest
    11      env:
    12        DOCKER_CLI_EXPERIMENTAL: enabled
    13      steps:
    14        - name: Checkout
    15          uses: actions/checkout@v2
    16          with:
    17            fetch-depth: 0
    18  
    19        - name: Setup QEMU
    20          uses: docker/setup-qemu-action@v1
    21  
    22        - name: Setup Docker Buildx
    23          uses: docker/setup-buildx-action@v1
    24  
    25        - name: Setup Go
    26          uses: actions/setup-go@v2
    27          with:
    28            go-version: 1.16
    29  
    30        - name: Login to DockerHub
    31          uses: docker/login-action@v1
    32          with:
    33            username: ${{ env.DOCKERHUB_USER }}
    34            password: ${{ secrets.DOCKERHUB_PASS }}
    35  
    36        - name: Login to GitHub Container Registry
    37          uses: docker/login-action@v1
    38          with:
    39            registry: ghcr.io
    40            username: ${{ github.repository_owner }}
    41            password: ${{ secrets.GHCR_PASS }}
    42  
    43        - name: Import GPG key
    44          uses: crazy-max/ghaction-import-gpg@v3
    45          id: gpg
    46          with:
    47            gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
    48            passphrase: ${{ secrets.GPG_PASSPHRASE }}
    49  
    50        - name: Publish release
    51          uses: goreleaser/goreleaser-action@v2
    52          env:
    53            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    54            GPG_FINGERPRINT: ${{ steps.gpg.outputs.fingerprint }}
    55          with:
    56            version: latest
    57            args: release --rm-dist