Merge pull request #9 from MagicMC-Dev/dependabot/npm_and_yarn/rollup… #71
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
# This is a basic workflow to help you get started with Actions | |
name: MMOitem Builder [Nightly Release] | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [Zh_cn] | |
schedule: | |
- cron: '0 21 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
server-id: phoenixdevt-releases | |
- name: Install depends | |
run: mvn install | |
- name: Test with Maven | |
run: mvn test | |
- name: Build with Maven | |
run: mvn -V -B clean package --file pom.xml | |
- name: Move files | |
run: mkdir staging && cp target/*.jar staging | |
- name: Set Release version env variable | |
run: | | |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
- name: Update Nightly Tag | |
run: | | |
git tag -f nightly | |
git push -f origin nightly | |
- name: Update Nightly Release | |
uses: "ncipollo/release-action@v1" | |
with: | |
tag: nightly | |
name: "Nightly Release ${{ env.RELEASE_VERSION }}" | |
body: "MMOItems Dev-build for ${{ env.RELEASE_VERSION }}\n> [!TIP]\n> 仅推荐使用 [**Paper**](https://papermc.io/) 或 [**Purpur**](https://purpurmc.org/) 作为服务端使用!\n> MythicLib 建议使用 [**Dev-Build**](https://phoenixdevt.fr/devbuilds)!\n 当前版本并非最终版本!仅为夜间构建版本!" | |
artifacts: | | |
./target/*.jar | |
allowUpdates: true | |
prerelease: true |