Velocitab/.github/workflows/ci.yml
dependabot[bot] 53bdeee74b
ci: bump actions/upload-artifact from 3 to 4 (#129)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-14 23:17:44 +00:00

113 lines
3.0 KiB
YAML

# Builds, tests the project with Gradle and publishes to Modrinth & Hangar
name: CI Tests & Publish
on:
push:
branches: [ 'master' ]
paths-ignore:
- 'docs/**'
- 'workflows/**'
- 'README.md'
permissions:
contents: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout for CI 🛎️'
uses: actions/checkout@v4
- name: 'Set up JDK 17 📦'
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: 'Build with Gradle 🏗️'
uses: gradle/gradle-build-action@v2
with:
arguments: build publish
env:
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
- name: 'Fetch Version Name 📝'
run: |
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')"
id: fetch-version
- name: Get Version
run: |
echo "version_name=${{steps.fetch-version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
- name: 'Publish to Modrinth & Hangar 🧽'
uses: WiIIiam278/mc-publish@hangar
with:
modrinth-id: Q10irTG0
modrinth-featured: false
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
modrinth-version-type: alpha
hangar-id: William278/Velocitab
hangar-token: ${{ secrets.HANGAR_API_KEY }}
hangar-version-type: Alpha
hangar-game-versions: |
3.3
files: target/Velocitab-*.jar
name: Velocitab v${{ env.version_name }}
version: ${{ env.version_name }}
changelog: ${{ github.event.head_commit.message }}
loaders: |
velocity
dependencies: |
luckperms | suggests | *
papiproxybridge | suggests | *
miniplaceholders | suggests | *
game-versions: |
1.8
1.8.1
1.8.2
1.8.3
1.8.4
1.8.5
1.8.6
1.8.7
1.8.8
1.8.9
1.12.2
1.13
1.13.1
1.13.2
1.14
1.14.1
1.14.2
1.14.3
1.14.4
1.15
1.15.1
1.15.2
1.16
1.16.1
1.16.2
1.16.3
1.16.4
1.16.5
1.17
1.17.1
1.18
1.18.1
1.18.2
1.19
1.19.1
1.19.2
1.19.3
1.19.4
1.20
1.20.1
1.20.2
1.20.3
1.20.4
java: 17
- name: 'Upload GitHub Artifact 📦'
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Velocitab
path: target/Velocitab-*.jar