This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
发布到 Github #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 发布到 Github | |
on: [ pull_request, workflow_dispatch ] | |
env: #环境变量,后续可以使用 ${{ env.MINECRAFT_VERSION }} 引用 | |
MINECRAFT_VERSION: 1.20.1 | |
JAVA_VERSION: 17 | |
permissions: | |
contents: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Publish package | |
run: mvn --batch-mode deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |