Skip to content

Commit

Permalink
Add github action release-curseforge
Browse files Browse the repository at this point in the history
  • Loading branch information
RagedUnicorn committed Oct 22, 2021
1 parent 75665d8 commit 680a9e0
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release_curseforge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on: [workflow_dispatch]

jobs:
curseforge-release-job:
runs-on: ubuntu-latest
name: CurseForge Release
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Java and Maven
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
- name: Cache Local Maven Repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Publish Package to CurseForge
run: mvn package -P deploy-curseforge-action -D curseforge.auth-token=$TOKEN_CURSEFORGE
env:
TOKEN_CURSEFORGE: ${{ secrets.TOKEN_CURSEFORGE }}
43 changes: 43 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,49 @@
</plugins>
</build>
</profile>
<profile>
<id>deploy-curseforge-action</id>
<properties>
<profile.id.value>deploy</profile.id.value>
<package.descriptor>${basedir}/build-resources/assembly-release.xml</package.descriptor>
<package.filter>${basedir}/build-resources/addon-release.properties</package.filter>
<package.finalName>${addon.name}</package.finalName>
<package.appendAssemblyId>false</package.appendAssemblyId>
<package.includeBaseDirectory>true</package.includeBaseDirectory>
<generate.sources.skip>true</generate.sources.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.ragedunicorn.tools.maven</groupId>
<artifactId>curseforge-release-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>default-cli</id>
<phase>package</phase>
<goals>
<goal>curseforge-release</goal>
</goals>
<configuration>
<game>wow</game>
<projectId>${addon.curseforge.projectid}</projectId>
<displayName>${addon.curseforge.displayName}-${addon.tag.version}-classic.zip</displayName>
<changelogFile>${basedir}/build-resources/release-notes.md</changelogFile>
<changelogType>markdown</changelogType>
<gameVersions>
<gameVersion>8668</gameVersion>
</gameVersions>
<releaseType>release</releaseType>
<file>${basedir}/target/${addon.name}.zip</file>
<token>${curseforge.auth-token}</token>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
Expand Down

0 comments on commit 680a9e0

Please sign in to comment.