Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeykhliustin committed Apr 30, 2024
1 parent fc061aa commit 3ff9e4c
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Get latest release tag
id: latesttag
run: |
CURRENT_VERSION=$(gh release list --limit 1 --json version | jq .[0].tagName | tr -d '"')
CURRENT_VERSION=$(gh release list --limit 1 --json tagName | jq .[0].tagName | tr -d '"')
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
- name: Validate new version
Expand Down Expand Up @@ -48,26 +48,23 @@ jobs:
gh release create "${{ github.ref }}" \
--title "${{ github.ref }}" \
--target "$GITHUB_REF_NAME" \
--target "$GITHUB_SHA" \
--generate-notes \
--prerelease \
--notes "
### Bzlmod Snippet
```bzl
bazel_dep(name = "bazelpods", version = "$new_version")
```
## Workspace Snippet
```starlark
http_archive(
name = \"bazelpods\",
sha256 = \"${{ env.SHA256 }}\",
url = \"https://github.com/sergeykhliustin/BazelPods/releases/download/${{ env.NEW_VERSION }}/release.tar.gz\"
)
load(\"@bazelpods//:repositories.bzl\", \"bazelpods_dependencies\")
bazelpods_dependencies()
```" \
--notes "### Bzlmod Snippet
\`\`\`starlark
bazel_dep(name = \"bazelpods\", version = \"${{ env.NEW_VERSION }}\")
\`\`\`
## Workspace Snippet
\`\`\`starlark
http_archive(
name = \"bazelpods\",
sha256 = \"${{ env.SHA256 }}\",
url = \"https://github.com/sergeykhliustin/BazelPods/releases/download/${{ env.NEW_VERSION }}/release.tar.gz\"
)
load(\"@bazelpods//:repositories.bzl\", \"bazelpods_dependencies\")
bazelpods_dependencies()
\`\`\`" \
"release.tar.gz"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3ff9e4c

Please sign in to comment.