Skip to content

Commit

Permalink
correct ship
Browse files Browse the repository at this point in the history
  • Loading branch information
codingkarthik committed Jan 24, 2025
1 parent ea82d19 commit 57d82a4
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ship.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ jobs:
fi
- name: Generate manifest entry
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
Expand All @@ -230,9 +231,12 @@ jobs:
SHA256=$(sha256sum cli/${{ matrix.platform }}/hasura-ndc-sqlserver | cut -d' ' -f1)
fi
# Extract tag from github.ref by removing 'refs/tags/' prefix
TAG=${GITHUB_REF#refs/tags/}
cat << EOF > manifest-entry.yaml
- selector: ${{ matrix.platform }}
uri: "https://github.com/${{ github.repository }}/releases/download/v2.0.0-test/cli.tar.gz"
uri: "https://github.com/${{ github.repository }}/releases/download/${TAG}/cli.tar.gz"
sha256: "${SHA256}"
bin: "cli-binary-${{matrix.platform}}/hasura-ndc-sqlserver${{ matrix.extension }}"
EOF
Expand All @@ -253,6 +257,7 @@ jobs:

create-cli-package:
needs: build-cli-binaries
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download all binaries
Expand Down Expand Up @@ -293,12 +298,12 @@ jobs:
release:
name: release to GitHub
needs:
# - push-docker-images # not strictly necessary, but if this fails, we should abort
- push-docker-images # not strictly necessary, but if this fails, we should abort
- build-cli-binaries
- create-cli-package
runs-on: ubuntu-latest
# We release when a tag is pushed.
# if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4

Expand All @@ -307,9 +312,9 @@ jobs:
name: release-artifacts
path: release/artifacts

# - name: generate a changelog
# run: |
# ./scripts/release-notes.py "${GITHUB_REF_NAME}" >> release/notes.md
- name: generate a changelog
run: |
./scripts/release-notes.py "${GITHUB_REF_NAME}" >> release/notes.md
- name: generate a connector package
run: |
Expand All @@ -326,5 +331,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
draft: true
# bodyFile: release/notes.md
bodyFile: release/notes.md
artifacts: release/artifacts/*

0 comments on commit 57d82a4

Please sign in to comment.