Skip to content

Commit 92addd6

Browse files
committed
Updated .gitignore and release workflow
1 parent 0e509c6 commit 92addd6

File tree

5 files changed

+450
-57
lines changed

5 files changed

+450
-57
lines changed

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 }}

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)