This repository was archived by the owner on Dec 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (52 loc) · 1.36 KB
/
test.yml
File metadata and controls
54 lines (52 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test
on:
push:
branches:
- "main"
paths:
- "action.yml"
- "index.js"
- "package-lock.json"
- "package.json"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Update
run: |
git config --global user.name "mcenv"
git config --global user.email "mcenv@users.noreply.github.com"
git worktree add dist dist
npm install
npm run package
cd dist
mv ../action.yml .
mv ../LICENSE .
mv ../README.md .
git add .
git commit --message "Update"
git push origin dist
- name: Setup Minecraft
id: minecraft
uses: mcenv/setup-minecraft@dist
with:
version: snapshot
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "microsoft"
java-version: ${{ fromJson(steps.minecraft.outputs.package).javaVersion.majorVersion }}
- name: Check Minecraft
run: |
echo Running Minecraft ${{ steps.minecraft.outputs.version }}.
java -jar $MINECRAFT --help