Create Release #10
This file contains hidden or 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: Create Release | |
| on: | |
| # schedule: | |
| # - cron: '0 0 1 * *' # Midnight on the 1st of the month | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{github.workflow}} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| create-release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Get tag metadata | |
| id: tag-meta | |
| run: | | |
| echo "tag_name=$(date +'%Y.%m.%d')" >> "$GITHUB_OUTPUT" | |
| - name: Download apply.py | |
| run: | | |
| pip install ruamel.yaml | |
| wget https://raw.githubusercontent.com/xivdev/EXDTools/refs/heads/main/apply.py | |
| - name: Download EXDTools | |
| if: ${{ github.event_name == 'schedule' }} | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: xivdev/EXDTools | |
| fileName: 'EXDTooler' | |
| latest: true | |
| - name: Chmod Executable | |
| if: ${{ github.event_name == 'schedule' }} | |
| run: chmod +x EXDTooler | |
| - name: Checkout submodules to branch | |
| run: git submodule foreach 'git checkout $(git describe --all HEAD | sed -En "s/(remotes\/origin\/|heads\/)//p")' | |
| - name: Run Column Merger | |
| if: ${{ github.event_name == 'schedule' }} | |
| run: ./EXDTooler merge-columns -b schemas | |
| - name: Run Apply | |
| run: python apply.py | |
| - name: Commit Changes | |
| run: | | |
| rm EXDTooler || : | |
| rm apply.py | |
| git config --global user.name github-actions[bot] | |
| git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com | |
| git submodule foreach ' | |
| git add . | |
| git commit -m "Creating release ${{steps.tag-meta.outputs.tag_name}}" || : | |
| git push | |
| ' | |
| git add --all | |
| git commit -m "Update submodules" || : | |
| git push | |
| - name: Zip submodules | |
| run: | | |
| mkdir -p artifacts | |
| git submodule foreach ' | |
| find . -maxdepth 1 -type f -name "*.yml" -print \ | |
| | zip -@ "$toplevel/artifacts/$(basename "$sm_path").zip" | |
| ' | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: artifacts/*.zip | |
| tag: ${{steps.tag-meta.outputs.tag_name}} | |