This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
CI Testing #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Snapshot | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
PACKAGE_NAME: tk.dingemans.bigibas123.ndmfvrcfreorder | |
PACKAGE_JSON: "./package.json" | |
jobs: | |
# Build and release the Package | |
# If the repository is not configured properly, this job will be skipped | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
- name: Get package properties | |
id: package_data | |
uses: zoexx/github-action-json-file-properties@1.0.4 | |
with: | |
file_path: "${{ env.PACKAGE_JSON }}" | |
prop_path: "version" | |
- name: Parse version from pacakge | |
id: package_version | |
uses: release-kit/semver@v2 | |
with: | |
string: "${{steps.repository_type.outputs.value}}" | |
- name: Get Last version | |
id: last_tag | |
uses: release-kit/semver@v2 | |
with: | |
source: latest-tag | |
fallback: "v0.1.0-alpha+0.0" | |
- name: Generate new version | |
id: current_version | |
uses: release-kit/semver@v2 | |
with: | |
string: "${{steps.package_version.outputs.major}}.${{steps.package_version.outputs.minor}}.${{steps.package_version.outputs.patch}}-${{steps.latest_tag.outputs.prerelease}}+${steps.latest_tag.outputs.prerelease.build}" | |
- name: Set Environment Variables | |
run: | | |
echo "version=${{ steps.current_version.outputs.full }}" >> $GITHUB_ENV | |
echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.current_version.outputs.full }}.unitypackage" >> $GITHUB_ENV | |
cat $GITHUB_ENV | |
# # Build a list of .meta files for future use | |
# - name: Track Package Meta Files | |
# run: find "${{ env.packagePath }}/" -name \*.meta >> metaList | |
# | |
# # Make a UnityPackage version of the Package for release | |
# - name: Create UnityPackage | |
# uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b | |
# with: | |
# package-path: ${{ env.unityPackage }} | |
# include-files: metaList |