Skip to content

Commit

Permalink
Switch back to the actions.yml from Diana's dotfiles
Browse files Browse the repository at this point in the history
Except we're now going to use GitHub's own Actions Workflow to
upload the ISO as well.
  • Loading branch information
kurtbahartr committed Dec 10, 2024
1 parent 7e34f94 commit 597e9e3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
id: install_depends
run: |
sudo add-apt-repository universe
sudo apt update
sudo apt-get install -y xorriso
- name: Build ISO
id: build_iso
if: ${{ env.NEW_RELEASE == '1' }}
run: |
files="$(cat FILES.txt | tr '\n' ' ')"
xorriso -as mkisofs -r -J --joliet-long -V 'STDU_GH' -o STDU-GH.iso -partition_offset 16 $(files)
echo "The password for both Linda and Sara are \"notarealpw\"." > password.txt
echo "See resources.txt to see how to change this within autounattend.xml." >> password.txt
xorriso -as mkisofs -r -J --joliet-long -V 'STDU_GH' -o STDU-GH.iso -partition_offset 16 $(files) password.txt
echo "ISO_PATH=$(pwd)/STDU-GH.iso" >> $GITHUB_ENV
- name: Run catalog script
id: run_script
Expand Down Expand Up @@ -70,17 +66,33 @@ jobs:
git push origin $TAG_NAME
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Output release notes
id: output_release_notes
if: ${{ env.NEW_RELEASE == '1' }}
run: |
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
cat release_notes.md >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create release
id: create_release
if: ${{ env.NEW_RELEASE == '1' }}
uses: softprops/action-gh-release@v2
uses: actions/create-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
release_name: ${{ env.TAG_NAME }} # No "Release" prefix here
body_path: release_notes.md
body: ${{ env.RELEASE_NOTES }}
draft: false
prerelease: false
files: STDU-GH.iso
fail_on_unmatched_files: true
make_latest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload ISO
id: upload_iso
if: ${{ env.NEW_RELEASE == '1' }}
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ISO_PATH }}
asset_name: St-Denis Unattended - GitHub Edition ${{ env.TAG_NAME }}
asset_content_type: application/octet-stream
10 changes: 10 additions & 0 deletions FILES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CHANGELOG.mkdn
README.mkdn
applist.txt
autounattend.xml
encode-for-autounattend.sh
mods.txt
resources.txt
winget-bundle.cmd
winget-bundle-optional.cmd
winget-bundle-all.cmd
2 changes: 1 addition & 1 deletion scripts/GetCatalog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ awk -v header="$VERSION_HEADER" -v website="$website" -v owner="$owner" -v repo=

# Add the "Full Changelog" line comparing the previous version with the current one only if a previous version exists
if [[ -n "$PREV_VERSION" ]]; then
echo "**Full Changelog**: $REMOTE_URL/compare/V$PREV_VERSION...V$VERSION"
echo "**Full Changelog**: $REMOTE_URL/compare/v$PREV_VERSION...v$VERSION"
fi

0 comments on commit 597e9e3

Please sign in to comment.