Package Paketti as .XRNX #54
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: Package Paketti as .XRNX | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
package-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# Zip the contents or specified directory of the repo, excluding specific XML files | |
- name: Zip XRNX Package | |
run: | | |
zip -r org.lackluster.Paketti_V3.54.xrnx . \ | |
-x "*.git*" "*.github*" \ | |
"preferences.xml" \ | |
"preferencesDynamicView.xml" | |
# Dynamically generate a tag name and set it as an environment variable | |
- name: Generate Tag Name | |
run: | | |
echo "TAG_NAME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV | |
# Create a tag with the generated tag name | |
- name: Create and Push Tag | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git tag $TAG_NAME | |
git push origin $TAG_NAME | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Create a GitHub release using the generated tag name | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TAG_NAME }} | |
release_name: Release ${{ env.TAG_NAME }} | |
draft: false | |
prerelease: false | |
# Upload the XRNX file to the GitHub release | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./org.lackluster.Paketti_V3.54.xrnx | |
asset_name: org.lackluster.Paketti_V3.54.xrnx | |
asset_content_type: application/octet-stream |