Upload to CurseForge #28
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: Upload to CurseForge | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to release' | |
| required: true | |
| jobs: | |
| upload: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get the version | |
| id: get_version | |
| run: echo ::set-output name=VERSION::${{ github.event.inputs.tag || github.ref_name }} | |
| - name: Generate Changelog | |
| id: generate_changelog | |
| run: | | |
| CHANGELOG=$(git log --pretty=format:'%s' HEAD^..HEAD) | |
| CHANGELOG="${CHANGELOG//'%'/'%25'}" | |
| CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | |
| CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | |
| echo ::set-output name=CHANGELOG::$CHANGELOG | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.event.inputs.tag || github.ref_name }} | |
| release_name: Release ${{ github.event.inputs.tag || github.ref_name }} | |
| body: | | |
| Changes in this Release: | |
| ${{ steps.generate_changelog.outputs.CHANGELOG }} | |
| draft: false | |
| prerelease: false | |
| - name: Bundle Addon | |
| run: | | |
| mkdir -p /tmp/QuickItemLevel | |
| cp -r ${{ github.workspace }}/* /tmp/QuickItemLevel/ | |
| mkdir -p ${{ github.workspace }}/build | |
| cd /tmp | |
| zip -r ${{ github.workspace }}/build/QuickItemLevel-${{ steps.get_version.outputs.VERSION }}.zip ./QuickItemLevel | |
| - name: Upload to CurseForge | |
| uses: itsmeow/[email protected] | |
| with: | |
| project_id: ${{ secrets.CURSEFORGE_PROJECT_ID }} | |
| file_path: build/QuickItemLevel-${{ steps.get_version.outputs.VERSION }}.zip | |
| changelog: Release ${{ steps.get_version.outputs.VERSION }} | |
| display_name: QuickItemLevel-${{ steps.get_version.outputs.VERSION }}.zip | |
| changelog_type: text | |
| game_endpoint: wow | |
| game_versions: "11596,11926,12215,12495,12918" | |
| relations: "quick-item-level:requiredDependency" | |
| token: ${{ secrets.CURSEFORGE_API_TOKEN }} |