41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Create Unity package from repo
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version (e.g. 1.0.0)'
|
|
required: true
|
|
|
|
jobs:
|
|
build-package:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Unity package folder
|
|
run: |
|
|
mkdir -p package
|
|
rsync -av --exclude='*.meta' Assets/Pacore/ package/
|
|
|
|
|
|
- name: Create tarball
|
|
run: |
|
|
VERSION=${{ github.event.inputs.version }}
|
|
PACKAGE_NAME="com.pashabibko.pacore-${VERSION}.tgz"
|
|
tar -czf "$PACKAGE_NAME" package
|
|
ls -1h "$PACKAGE_NAME"
|
|
|
|
- name: Create Github Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ github.event.inputs.version }}
|
|
name: Release ${{ github.event.inputs.version }}
|
|
body: "Automated release of Pacore package"
|
|
artifacts: "com.pashabibko.pacore-${{ github.event.inputs.version }}.tgz"
|
|
draft: false
|
|
prerelease: false
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|