October: Discord theme migration update (#15) #21
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/${dir_name}.zip" *); done | |
- name: Copy zips to complete archive zip format | |
run: | | |
cp -a /tmp/release/*.zip /tmp/release/run/muos/storage/theme/ | |
# Create the archive! | |
- name: Zip complete folder | |
run: | | |
(cd /tmp/release && zip -r @_Complete_Theme_Archive.zip run) | |
- 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" | |
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" | |
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}}" | |