-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First attempt at something that de-duplicates the materials as a repl…
…acement for ndmfvrcf reordered
- Loading branch information
0 parents
commit 6f10b89
Showing
14 changed files
with
2,331 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Create release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
env: | ||
PACKAGE_JSON: "./package.json" | ||
PACKAGE_PATH: "." | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.1 | ||
with: | ||
fetch-tags: true | ||
- run: | | ||
git fetch --unshallow --tags | ||
echo $? | ||
git tag --list | ||
- name: Get package properties | ||
id: package_data | ||
uses: zoexx/github-action-json-file-properties@1.0.4 | ||
with: | ||
file_path: "${{ env.PACKAGE_JSON }}" | ||
|
||
- name: Get last tag | ||
run: | | ||
echo "old_tag=$(git describe --tags --abbrev=0)" | tee -a $GITHUB_ENV | ||
- name: Parse git tag version | ||
id: tag_version | ||
uses: madhead/semver-utils@v3.1.0 | ||
with: | ||
lenient: false | ||
version: ${{ env.old_tag }} | ||
compare-to: ${{ steps.package_data.outputs.version }} | ||
- name: Pick Incremented old tag | ||
id: tag_pre_release | ||
if: ${{ steps.tag_version.outputs.comparison-result != '<' }} | ||
run: | | ||
echo "version=${{ steps.tag_version.outputs.inc-patch }}" >> $GITHUB_ENV | ||
- name: Pick package version | ||
id: tag_post_release | ||
if: ${{ steps.tag_version.outputs.comparison-result == '<' }} | ||
run: | | ||
echo "version=${{ steps.package_data.outputs.version }}" >> $GITHUB_ENV | ||
- name: Replace version in package.json | ||
run: jq ' .version = "${{ env.version }}"' ${{ env.PACKAGE_JSON }} > tmp && mv tmp ${{ env.PACKAGE_JSON }} | ||
|
||
- name: Create Package Zip | ||
working-directory: "${{ env.PACKAGE_PATH }}" | ||
run: zip -r "${{ steps.package_data.outputs.name }}-${{ env.version }}.zip" . -x ".git/*" ".github/*" | ||
|
||
- name: Create Tag | ||
id: create_tag | ||
uses: rickstaa/action-create-tag@88dbf7ff6fe2405f8e8f6c6fdfd78829bc631f83 | ||
with: | ||
tag: ${{ env.version }} | ||
|
||
- name: Make Release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | ||
with: | ||
files: | | ||
${{ steps.package_data.outputs.name }}-${{ env.version }}.unitypackage | ||
${{ steps.package_data.outputs.name }}-${{ env.version }}.zip | ||
${{ env.PACKAGE_JSON }} | ||
tag_name: ${{ env.version }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Trigger VCC Update | ||
on: | ||
release: | ||
types: | ||
- published | ||
- unpublished | ||
- deleted | ||
- prereleased | ||
- released | ||
workflow_run: | ||
workflows: ["Create release"] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
env: | ||
VCC_REPO: VCC | ||
|
||
jobs: | ||
trigger_vcc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Generate a token | ||
id: generate_token | ||
uses: actions/create-github-app-token@v1.6.2 | ||
with: | ||
app-id: ${{ vars.DEPLOY_APP_ID }} | ||
private-key: ${{ secrets.DEPLOY_APP_PRIVATE_KEY }} | ||
owner: ${{ github.repository_owner }} | ||
repositories: ${{ env.VCC_REPO }} | ||
- name: Use the token | ||
env: | ||
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
run: | | ||
gh workflow run --repo ${{ github.repository_owner }}/${{ env.VCC_REPO }} build-listing.yml | ||
Oops, something went wrong.