Skip to content

update workflow

update workflow #5

name: Build version
on:
push:
branches:
- '**' # for all branches
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: temurin
- name: Add secrets
run: |
echo curse_auth=${{ secrets.CURSEFORGE_TOKEN }} >> secrets.properties
echo modrinth_auth=${{ secrets.MODRINTH_TOKEN }} >> secrets.properties
echo mavenUsername=${{ secrets.MAVEN_USERNAME }} >> gradle.properties
echo mavenPassword=${{ secrets.MAVEN_PASSWORD }} >> gradle.properties
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build
run: ./gradlew publish curseforge modrinth
env:
GIT_COMMIT: ${{ github.sha }}
GIT_PREVIOUS_COMMIT: ${{ github.event.before }}