From 8158e8fe5582da41ffefdf7a71f3f9e6b790df25 Mon Sep 17 00:00:00 2001 From: EvanCobb Date: Sat, 26 Feb 2022 22:18:46 -0600 Subject: [PATCH] uses shared github workflow to release so it's easier for me to maintain all these different addons in their repos --- .github/archived/release-curse.yml | 35 --------------- .github/workflows/release-wowi.yml | 71 ------------------------------ .github/workflows/release.yml | 19 ++++++++ 3 files changed, 19 insertions(+), 106 deletions(-) delete mode 100644 .github/archived/release-curse.yml delete mode 100644 .github/workflows/release-wowi.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/archived/release-curse.yml b/.github/archived/release-curse.yml deleted file mode 100644 index 09edfe2..0000000 --- a/.github/archived/release-curse.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Release to Curse - -on: - workflow_dispatch: - branches: [ main ] - push: - branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout the code - uses: actions/checkout@v2 - - - name: Create 'dist' folder - run: mkdir Broker_CTA/ - - - name: Put everything into a folder - run: cp Broker_CTA.lua Broker.lua Display.lua Localization.lua Broker_CTA.toc LICENSE README.md Broker_CTA/ - - - name: Zip it good - run: zip -9 -r Broker_CTA.zip Broker_CTA/ - - # - name: Upload to CurseForge - # uses: itsmeow/curseforge-upload@v2 - # with: - # token: ${{ secrets.CURSEFORGE }} - # project_id: 101689 - # game_endpoint: wow - # file_path: Broker_CTA.zip - # changelog: See https://github.com/icbat/broker-call-to-arms for latest changes - # game_versions: 8.3.0,9.0.1 - # release_type: release diff --git a/.github/workflows/release-wowi.yml b/.github/workflows/release-wowi.yml deleted file mode 100644 index 5ef7db0..0000000 --- a/.github/workflows/release-wowi.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Release to WoW Interface - -env: - # Must match the name of your TOC file for WoW to load this addon at all - ADDON_NAME: Broker_CTA - # The list of what you want to ship in your ZIP file, minus the TOC which is required - ADDON_BUNDLE_FILES: libs/ Broker_CTA.lua Broker.lua Display.lua Localization.lua LICENSE README.md - # The ID number for WoW Interface to be able to upload - WOWI_ID: 25623 - -on: - workflow_dispatch: - # Enables a button to manually run this against the main branch - branches: [ main ] - push: - # Enables automatic deploys off pushes/merges into the main branch - branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout the code - uses: actions/checkout@v2 - - - name: Create 'dist' folder - run: mkdir ${{env.ADDON_NAME}}/ - - - name: Put everything into a folder - run: cp -r ${{ env.ADDON_BUNDLE_FILES }} ${{ env.ADDON_NAME }}.toc ${{env.ADDON_NAME}}/ - - - name: Zip it good - run: zip -9 -r ${{env.ADDON_NAME}}.zip ${{env.ADDON_NAME}}/ - - - name: Parse WoW Addon Verions - id: get_versions - uses: icbat/parse-wow-addon-version@v1.1.0 - with: - tocfile: ${{ env.ADDON_NAME }}.toc - - - name: Create GH Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.get_versions.outputs.addon_version }} - release_name: Release ${{ steps.get_versions.outputs.addon_version }} - draft: false - prerelease: false - - - name: Upload GH Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./${{ env.ADDON_NAME }}.zip - asset_name: ${{ env.ADDON_NAME }}.zip - asset_content_type: application/zip - - - name: Upload to WoW Interface - uses: icbat/wow-addon-upload-action@v1.0.3 - with: - id: ${{ env.WOWI_ID }} - zipFilePath: ${{ env.ADDON_NAME }}.zip - compatible: ${{ steps.get_versions.outputs.supported_version_semantic }} - version: ${{ steps.get_versions.outputs.addon_version }} - apiKey: ${{ secrets.WOW_INTERFACE }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4011505 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Release new version of addon to WoW Interface + +on: + workflow_dispatch: + # Enables a button to manually run this against the main branch + branches: [ main ] + push: + # Enables automatic deploys off pushes/merges into the main branch + branches: [ main ] + +jobs: + build: + uses: icbat/wow-addon-github-workflow/.github/workflows/release-wowi.yml@main + with: + addon_name: Broker_CTA + addon_bundled_files: libs/ Broker_CTA.lua Broker.lua Display.lua Localization.lua LICENSE README.md + wowi_id: 25623 + secrets: + wowi_api_token: ${{secrets.WOWI_API_TOKEN}}