diff --git a/.github/workflows/enki-image.yml b/.github/workflows/release.yml similarity index 73% rename from .github/workflows/enki-image.yml rename to .github/workflows/release.yml index 64fffeb..ab640fa 100644 --- a/.github/workflows/enki-image.yml +++ b/.github/workflows/release.yml @@ -1,18 +1,38 @@ --- -name: 'Build enki image' +name: 'Release enki' on: push: - branches: - - main tags: - - '*' + - 'v*' + concurrency: - group: enki-image-${{ github.ref || github.head_ref }} + group: release-enki-${{ github.ref || github.head_ref }} cancel-in-progress: true jobs: - docker: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + git fetch --prune --unshallow + - name: Generate version + run: echo "VERSION=$(git describe --always --tags --dirty)" >> $GITHUB_ENV + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ^1.20 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ env.VERSION }} + + build-image: runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/enki.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/enki.yml rename to .github/workflows/test.yml