name: ci on: push: tags: - v* jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Test code run: make test - name: Import GPG key id: import_gpg uses: https://github.com/crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Set up QEMU uses: https://github.com/docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: https://github.com/docker/setup-buildx-action@v3 - name: Install GoReleaser uses: https://github.com/goreleaser/goreleaser-action@v6 with: install-only: true - name: Docker login run: | REGISTRY="${GITHUB_SERVER_URL#https://}" echo "${{ secrets.PACKAGES_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.repository_owner }}" --password-stdin echo "DOCKER_REGISTRY=$REGISTRY" >> "$GITHUB_ENV" echo "DOCKER_ORG=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" - name: Run GoReleaser run: | unset GITHUB_TOKEN goreleaser release --clean env: GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}