File tree Expand file tree Collapse file tree 5 files changed +450
-57
lines changed Expand file tree Collapse file tree 5 files changed +450
-57
lines changed Original file line number Diff line number Diff line change 1+ name : Build and upload artifact
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+ workflow_dispatch :
8+
9+ jobs :
10+ build-package :
11+ name : Build and export package
12+ runs-on : ubuntu-latest
13+ steps :
14+
15+ # Checkout
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ with :
19+ lfs : true
20+
21+ # Read package name and version from package.json
22+ - name : Get package name and version
23+ id : pkg
24+ run : |
25+ PKG_NAME=$(jq -r '.name' /package.json)
26+ PKG_VERSION=$(jq -r '.version' /package.json)
27+ PKG_FILENAME="$(basename $PKG_NAME)-$PKG_VERSION.tgz"
28+ echo "pkg_name=$PKG_NAME" >> $GITHUB_OUTPUT
29+ echo "pkg_version=$PKG_VERSION" >> $GITHUB_OUTPUT
30+ echo "pkg_filename=$PKG_FILENAME" >> $GITHUB_OUTPUT
31+
32+ # Create .tgz tarball of the package folder
33+ - name : Pack UPM package
34+ run : |
35+ cd unity-package
36+ tar -czf "../${{ steps.pkg.outputs.pkg_filename }}" *
37+
38+ - name : Create Release
39+ uses : softprops/action-gh-release@v2
40+ with :
41+ files : ${{ steps.pkg.outputs.pkg_filename }}
42+ tag_name : ${{ github.ref_name }}
43+ name : Release ${{ steps.pkg.outputs.pkg_version }}
44+ body : |
45+ 🎉 New release of ${{ steps.pkg.outputs.pkg_name }}
46+ Version: ${{ steps.pkg.outputs.pkg_version }}
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments