Remove double CLASS #7
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: Generate XMIT | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| process: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changed: ${{ steps.commit.outputs.changed }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install git+https://github.com/wizardofzos/xmi.git@creation | |
| - name: Run processing script | |
| run: | | |
| mkdir -p $RUNNER_TEMP/RACFURY.PDS | |
| python .github/scripts/generate_xmit.py $RUNNER_TEMP/RACFURY.PDS | |
| - name: Commit changes | |
| id: commit | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| git add RACFURY.XMIT | |
| if git diff --cached --quiet; then | |
| echo "No changes detected" | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| git commit -m "Automated XMI generation" | |
| git push | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| release: | |
| needs: process | |
| if: needs.process.outputs.changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create tag | |
| id: tag | |
| run: | | |
| VERSION="racfury-$(date +'%Y%m%d-%H%M%S')" | |
| git tag $VERSION | |
| git push origin $VERSION | |
| echo "tag=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.tag }} | |
| generate_release_notes: true | |
| files: RACFURY.XMIT |