diff --git a/.github/build.yml b/.github/workflows/build.yml similarity index 100% rename from .github/build.yml rename to .github/workflows/build.yml diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 1de9314d7..c4e553f5d 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -19,8 +19,6 @@ jobs: go-version: 1.22.1 - name: ⬇️ Check out code into the Go module directory uses: actions/checkout@v3 - with: - fetch-depth: 5 - name: Version id: version run: | @@ -52,20 +50,20 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: asset_paths: '["./bin/gimlet*"]' - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v1 - # with: - # registry: ghcr.io - # username: ${{ github.repository_owner }} - # password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope - # # - name: Build and push Docker image - # uses: docker/build-push-action@v2 - # with: - # context: . - # file: docker/cli/Dockerfile - # platforms: linux/amd64 - # push: true - # tags: | - # ghcr.io/gimlet-io/gimlet-cli:${{ steps.version.outputs.version }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: docker/cli/Dockerfile + platforms: linux/amd64 + push: true + tags: | + ghcr.io/gimlet-io/gimlet-cli:${{ steps.version.outputs.version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b22e12bc2..6840d4d50 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -66,3 +66,13 @@ jobs: push: true tags: | ghcr.io/gimlet-io/gimlet:agent-${{ steps.version.outputs.version }} + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Gimlet ${{ steps.version.outputs.version }} + draft: false + prerelease: false