--- name: Release on: push: tags: - "*" # triggers only if push new tag version workflow_dispatch: jobs: goreleaser: if: github.repository == 'juanfont/headscale' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Login to DockerHub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GHCR uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - uses: nixbuild/nix-quick-install-action@master - uses: nix-community/cache-nix-action@main with: primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }} - name: Run goreleaser run: nix develop --command -- goreleaser release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}