Update repo location #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release ISO | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
repository-projects: write | |
container: | |
image: archlinux/archlinux:latest | |
options: --privileged | |
steps: | |
- name: Checkout repository using git | |
run: | | |
pacman -Sy git grub sudo archiso --noconfirm | |
git clone --recurse-submodules https://github.com/StratOS-Linux/StratOS-Hyprland | |
- name: Set up environment | |
run: | | |
export BUILD_DATE=$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d) | |
echo "BUILD_DATE=${BUILD_DATE}" >> $GITHUB_ENV | |
echo "::set-output name=date::${BUILD_DATE}" | |
- name: Build ISO | |
id: build_iso | |
run: | | |
cd StratOS-Hyprland | |
sudo bash ./build.sh | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ env.BUILD_DATE }} | |
release_name: v${{ env.BUILD_DATE }} | |
body: | | |
Automated release powered by GitHub Actions. | |
- name: Upload ISO as Release Asset | |
id: upload_asset | |
uses: actions/upload-release-asset@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: StratOS-Hyprland/output/StratOS-${{ env.BUILD_DATE }}-x86_64.iso | |
asset_name: StratOS-${{ env.BUILD_DATE }}-x86_64.iso | |
asset_content_type: application/octet-stream |