Skip to content

Commit

Permalink
Auto-upload a release archive
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten committed Jan 27, 2024
1 parent 7321633 commit 8c1556f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{TAG}.tar.gz"
}
23 changes: 23 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

"on":
release:
types: [published]

jobs:
attach-release-archive:
runs-on: ubuntu-latest
steps:
- run: wget https://github.com/$GITHUB_REPOSITORY/archive/refs/tags/${GITHUB_REF_NAME}.tar.gz -O rules_appimage-${GITHUB_REF_NAME}.tar.gz
- run: |
set -x
REL_SHA="$(sha256sum rules_appimage-${GITHUB_REF_NAME}.tar.gz | cut -d' ' -f1)"
REL_BODY="$(sed "s/\$REL_SHA/$REL_SHA/" <<<'${{ github.event.release.body }}'")
echo "REL_BODY=$REL_BODY" >> $GITHUB_ENV
- uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: rules_appimage-${GITHUB_REF_NAME}.tar.gz
tag: ${GITHUB_REF_NAME}
overwrite: true
body: "$REL_BODY"

0 comments on commit 8c1556f

Please sign in to comment.