Create Release Package #170
Workflow file for this run
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 Package | |
| on: | |
| create: | |
| env: | |
| CF_API_KEY: ${{ secrets.CF_API_KEY }} | |
| WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }} | |
| WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }} | |
| GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| is_release: | |
| if: contains(github.ref, 'beta') == false && contains(github.ref, 'nightly') == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check | |
| run: | | |
| echo ${{ github.event }} | |
| echo ${{ github.event_name }} | |
| echo ${{ github.event_path }} | |
| echo ${{ github.ref }} | |
| mainline: | |
| needs: is_release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Trim changelog to current release | |
| run: | | |
| version="${GITHUB_REF#refs/tags/}" | |
| python3 -c " | |
| import sys, re | |
| ver = '$version' | |
| text = open('CHANGELOG.md').read() | |
| pattern = r'(## \[' + re.escape(ver) + r'\].*?)(?=\n## [\[D])' | |
| m = re.search(pattern, text, re.DOTALL) | |
| if not m: | |
| sys.exit(1) | |
| body = m.group(1).rstrip() | |
| link = re.search(r'^\[' + re.escape(ver) + r'\]:.*$', text, re.MULTILINE) | |
| if link: | |
| body += '\n\n## Detailed Changes ##\n' + link.group(0) + '\n' | |
| print(body) | |
| " > CHANGELOG_RELEASE.md | |
| if [ -s CHANGELOG_RELEASE.md ]; then | |
| mv CHANGELOG_RELEASE.md CHANGELOG.md | |
| else | |
| echo "Warning: Could not extract changelog for version $version" | |
| fi | |
| - name: Create Mainline Package | |
| uses: BigWigsMods/packager@842112a80d0d8faec9f61295c5e89944311d8a5d # v2.5.1 | |
| # wrath: | |
| # needs: is_release | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # - name: Create Wrath Package | |
| # uses: BigWigsMods/packager@842112a80d0d8faec9f61295c5e89944311d8a5d # v2.5.1 | |
| # with: | |
| # args: -g wrath -m .pkgmeta-wrath | |
| # vanilla: | |
| # needs: is_release | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| # - name: Create Vanilla Package | |
| # uses: BigWigsMods/packager@842112a80d0d8faec9f61295c5e89944311d8a5d # v2.5.1 | |
| # with: | |
| # args: -g classic -m .pkgmeta-vanilla |