Skip to content

updated addon version #50

updated addon version

updated addon version #50

Workflow file for this run

name: Upload Addon to CurseForge
on:
push:
branches:
- main
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Determine version number
id: latest_version
run: |
# Extract the version number from the TOC file
echo "::set-output name=v::$(grep -oP 'Version: \Kv\d+\.\d+\.\d+' AvgItemLvl.toc)"
- name: Create version tag
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
run: |
git config user.name "GitHub Action"
git config user.email "github-action@users.noreply.github.com"
git fetch --prune --unshallow
latest_tag=$(git describe --tags --abbrev=0)
if [[ "$latest_tag" < ${{ steps.latest_version.outputs.v }} ]]; then
git tag ${{ steps.latest_version.outputs.v }}
git push origin ${{ steps.latest_version.outputs.v }}
else
echo "Latest tag ($latest_tag) is already up-to-date with version ${{ steps.latest_version.outputs.v }}"
fi
- name: Zip addon contents
run: |
rm -rf .git
rm -rf .github
zip -r AvgItemLvl-${{ steps.latest_version.outputs.v }}.zip .
- name: Upload Addon to CurseForge
uses: itsmeow/curseforge-upload@v3
with:
token: ${{ secrets.CURSEFORGE_API_TOKEN }}
project_id: ${{ secrets.CURSEFORGE_ADDON_ID }}
game_endpoint: "wow"
release_type: release
changelog: "${{ steps.latest_version.outputs.v }} update"
file_path: AvgItemLvl-${{ steps.latest_version.outputs.v }}.zip