Skip to content

publish

publish #3

Workflow file for this run

name: publish
on: [ release ]
env:
MINECRAFT_VERSION: 1.20.4
JAVA_VERSION: 17
VERSION: ${{ env.GITHUB_REF }}+${{ env.MINECRAFT_VERSION }}

Check failure on line 8 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / publish

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 8, Col: 12): Unrecognized named-value: 'env'. Located at position 1 within expression: env.GITHUB_REF .github/workflows/publish.yml (Line: 9, Col: 17): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VERSION
RELEASE_NAME: Hey Wiki ${{ env.VERSION }} for Minecraft ${{ env.MINECRAFT_VERSION }}
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: setup jdk 17
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: publish
uses: Kir-Antipov/[email protected]
with:
# curseforge-id: 123456
# curseforge-token: "${{ env.CURSEFORGE_TOKEN }}"
modrinth-id: 6DnswkCZ
modrinth-token: "${{ env.MODRINTH_TOKEN }}"
github-token: "${{ env.GITHUB_TOKEN }}"
name: "${{ env.RELEASE_NAME }}"
version: "${{ env.VERSION }}"
version-type: release
changelog-file: CHANGELOG.md
- name: capture build artifacts
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/