Skip to content

Commit

Permalink
fix release workflow and release template
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Mar 13, 2023
1 parent 804a4a5 commit 9b34f36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/release-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ ${CHANGELOG}
The following installation archives can be downloaded for different hardware platforms. To verify their integrity a `sha256` checksum is provided as well.

- Intel NUC:
<sub>:package: [thinRoot-${VERSION}-intelnuc.zip](https://github.com/jens-maus/thinRoot/releases/download/${VERSION}/thinRoot-${VERSION}-intelnuc.zip)<br/>SHA256: XSHAintelnuc.zipX</sub>
<sub>:package: [thinRoot-${VERSION}-intelnuc.img](https://github.com/jens-maus/thinRoot/releases/download/${VERSION}/thinRoot-${VERSION}-intelnuc.img)<br/>SHA256: XSHAintelnuc.imgX</sub>
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:

build:
permissions:
contents: write # actions/upload-release-asset
contents: write # shogo82148/actions-upload-release-asset
name: Release build [${{ matrix.platform }}]
if: github.repository == 'jens-maus/thinRoot'
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
# - name: remote debug tmate session
# uses: mxschmitt/action-tmate@v1
# if: matrix.platform == 'ova'
# if: matrix.platform == 'intelnuc'

# major build step
- name: Build
Expand All @@ -161,23 +161,17 @@ jobs:
#######################
# release uploads
- name: Upload release snapshot [intelnuc]
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.release_draft.outputs.upload_url }}
asset_path: release/thinroot-${{ needs.release_draft.outputs.version }}-${{ matrix.platform }}.img
asset_name: thinroot-${{ needs.release_draft.outputs.version }}-${{ matrix.platform }}.img
asset_content_type: application/octet-stream

- name: Upload build release checksum [intelnuc]
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ needs.release_draft.outputs.upload_url }}
asset_path: release/thinroot-${{ needs.release_draft.outputs.version }}-${{ matrix.platform }}.img.sha256
asset_name: thinroot-${{ needs.release_draft.outputs.version }}-${{ matrix.platform }}.img.sha256
asset_content_type: text/plain

#######################
Expand Down Expand Up @@ -211,9 +205,6 @@ jobs:
while read -r line; do
NEEDLE=$(echo "${line}" | awk '{print $3}' | sed 's/.*-\(.*\..*\)$/\1/')
SHACKS=$(echo "${line}" | awk '{print $2}')
if [[ "${NEEDLE##*.}" == "ova" ]]; then
NEEDLE="ova"
fi
sed -i "s/XSHA${NEEDLE}X/${SHACKS}/" release-template.md/release-template.md
done < <(cat ${f})
done
Expand Down

0 comments on commit 9b34f36

Please sign in to comment.