~ knotless Search/
↑↓ move↵ open⇧↵ all results

johnandersen777.bsky.social/socialweb-computer-console

console.socialweb.computer: kcp, kubectl and ssh compiled to wasm in a browser tab with a terminal; a kcp fork

0
0
main
83 lines · 2.4 KB Raw History
name: goreleaser

on:
  pull_request:
    paths:
      - .github/workflows/goreleaser.yml
      - .goreleaser.yaml
  push:
    tags:
      - "v*"

permissions:
  contents: write

jobs:
  goreleaser:
    runs-on: ubuntu-latest
    steps:
      - name: Free disk space
        uses: thiagokokada/free-disk-space@9a03d73a373bab1e204b8815f5c7752392482762
        with:
          # All of these do save some disk space, but are also somewhat slow to delete.
          # So we keep them to just speed up the workflow overall.
          android: false
          aws-cli: false
          debug: false
          docker-images: false
          google-cloud-sdk: false
          heroku: false
          llvm: false
          opt: false
          powershell: false
          python: false
          ruby: false
          rust: false
          tool-cache: false
          usrlocal: false
          usrmisc: false
          varcache: false

      - name: Checkout
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # tag=v7.0.1
        with:
          fetch-depth: 0

      - name: Setup Go
        uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # tag=v7.0.0
        with:
          go-version: v1.26.4

      - name: Delete non-semver tags
        run: 'git tag -d $(git tag -l | grep -v "^v")'

      - name: Set LDFLAGS
        run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV

      - name: Run GoReleaser on tag
        if: github.event_name != 'pull_request'
        uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # tag=v7.2.3
        with:
          distribution: goreleaser
          version: "~> v2"
          args: release --timeout 60m
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}

      - name: Run GoReleaser on pull request
        if: github.event_name == 'pull_request'
        uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # tag=v7.2.3
        with:
          distribution: goreleaser
          version: "~> v2"
          args: release --timeout 60m --snapshot
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}

      - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # tag=v7.0.1
        if: ${{ always() }}
        with:
          name: binaries
          path: dist/*.tar.gz