Move preview images (#9) #16
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: muOS Complete Archive Manager Theme Releases | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
concurrency: | |
group: release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
repository-projects: write | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
# Create theme archives here! Zipping everything together and creating a complete theme archive. | |
- name: Zip directories | |
run: | | |
mkdir -p /tmp/release/run/muos/storage/theme && for dir in */; do dir_name="${dir%/}"; (cd "$dir_name" && zip -qq -r "/tmp/release/run/muos/storage/theme/${dir_name}.zip" *); done | |
# Create the archive! | |
- name: Zip mnt folder | |
run: | | |
(cd /tmp/release && zip -r @_Complete_Theme_Archive.zip run) | |
- name: Create individual archive managers | |
run: | | |
for dir in */; do dir_name="${dir%/}"; (cd /tmp/release && zip -r "${dir_name}.zip" . -i "/run/muos/storage/theme/${dir_name}.zip"); done | |
- name: List archives | |
run: | | |
ls -1 /tmp/release | |
- name: Delete releases | |
uses: sgpublic/[email protected] | |
with: | |
release-drop: true | |
release-keep-count: -1 | |
release-drop-tag: true | |
pre-release-drop: true | |
pre-release-keep-count: -1 | |
pre-release-drop-tag: true | |
draft-drop: true | |
draft-drop-count: -1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get release name for artifacts | |
id: date | |
run: | | |
echo "date=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_OUTPUT | |
- name: Prepare Release | |
uses: ncipollo/[email protected] | |
with: | |
name: "All Themes - Archive Manager" | |
tag: "${{steps.date.outputs.date}}" | |
allowUpdates: true | |
draft: true | |
prerelease: false | |
replacesArtifacts: false | |
omitNameDuringUpdate: true | |
artifacts: "/tmp/release/*" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Release | |
uses: ncipollo/[email protected] | |
with: | |
name: "All Themes - Archive Manager" | |
tag: "${{steps.date.outputs.date}}" | |
omitBodyDuringUpdate: true | |
omitNameDuringUpdate: true | |
allowUpdates: true | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release Info | |
id: info | |
run: | | |
echo "Published themes: ${{steps.date.outputs.date}} to: https://github.com/${{ steps.env.outputs.RELEASE_ORG}}/${{ steps.env.outputs.RELEASE_REPO}}" | |