Skip to content

Commit ebf8fec

Browse files
committed
feat: create release workflow
1 parent 5896a53 commit ebf8fec

4 files changed

Lines changed: 112 additions & 88 deletions

File tree

.github/workflows/release.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: "Release by Tag"
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
12+
13+
permissions:
14+
contents: read
15+
id-token: write
16+
17+
jobs:
18+
vars:
19+
runs-on: ubuntu-slim
20+
outputs:
21+
version: ${{ steps.version.outputs.version }}
22+
steps:
23+
- name: Set version
24+
id: version
25+
run: |
26+
VERSION=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\///' | sed -e 's/refs\/heads\///' | sed -e 's/\//-/')
27+
echo "version=$VERSION" >> $GITHUB_OUTPUT
28+
29+
build-unitypackage:
30+
runs-on: ubuntu-latest
31+
needs: [vars]
32+
steps:
33+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
34+
with:
35+
lfs: true
36+
37+
- run: |
38+
mkdir -p dist
39+
40+
- uses: natsuneko-laboratory/create-unitypackage@bbb27c1e955b84b7063c1db9ff3430d40bc3e110 # v3.2.0
41+
with:
42+
files-glob: |
43+
Assets/NatsunekoLaboratory/AnimatorControllerToolPostProcessing/**/*.*
44+
dest: dist/AnimatorControllerToolPostProcessing-${{ needs.vars.outputs.version }}.unitypackage
45+
46+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
47+
with:
48+
path: dist/*.unitypackage
49+
name: UnityPackages
50+
51+
build-vpmpackage:
52+
runs-on: ubuntu-latest
53+
needs: [vars]
54+
steps:
55+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
56+
with:
57+
lfs: true
58+
59+
- run: |
60+
mkdir -p dist
61+
62+
- uses: natsuneko-laboratory/create-vpmpackage@afd6b5e106f88d14b915c0c538c0315d83bba447 # v1.5.0
63+
with:
64+
packages: |
65+
Assets/NatsunekoLaboratory/AnimatorControllerToolPostProcessing/package.json
66+
outputs: |
67+
dist/AnimatorControllerToolPostProcessing-${{ needs.vars.outputs.version }}.zip
68+
69+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
70+
with:
71+
path: dist/*.zip
72+
name: VPMPackages
73+
74+
release:
75+
runs-on: ubuntu-slim
76+
77+
permissions:
78+
contents: write
79+
id-token: write
80+
needs:
81+
- vars
82+
- build-unitypackage
83+
- build-vpmpackage
84+
steps:
85+
- name: Download artifacts
86+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
87+
with:
88+
path: ./dist
89+
90+
- name: List artifacts
91+
id: items
92+
run: |
93+
ITEMS=$(find ./dist -type f)
94+
echo -e "$ITEMS"
95+
96+
- name: Publish release
97+
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
98+
if: startsWith(github.ref, 'refs/tags/')
99+
with:
100+
prerelease: ${{ contains(needs.vars.outputs.version, 'alpha') || contains(needs.vars.outputs.version, 'beta') || contains(needs.vars.outputs.version, 'rc') }}
101+
generate_release_notes: true
102+
files: |
103+
./dist/*/*.zip
104+
./dist/*/*.unitypackage
105+
106+
- name: Publish release (Remuria)
107+
uses: natsuneko-laboratory/publish-vpmpackage@af2855e0de469796240a21e22f5cc26985fdb6ec # v0.2.8
108+
if: startsWith(github.ref, 'refs/tags/')
109+
with:
110+
packages: |
111+
dist/VPMPackages/AnimatorControllerToolPostProcessing-${{ needs.vars.outputs.version }}.zip

.github/workflows/unitypackage.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/vpmpackage.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

Assets/NatsunekoLaboratory/AnimatorControllerToolPostProcessing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cat.natsuneko.animator-controller-tool-post-processing",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Rewrite the behavior of AnimatorControllerTool to be the default setting recommended by VRChat.",
55
"displayName": "Animator Controller Tool Post Processing",
66
"unity": "2019.4",

0 commit comments

Comments
 (0)