From f9d8e47d72d9b515d5f48687b9a6c57bd51ca6d0 Mon Sep 17 00:00:00 2001 From: Misaka-L Date: Sat, 12 Oct 2024 02:00:19 +0800 Subject: [PATCH] ci: fix release ci & upgrade step action --- .github/workflows/create-package.yml | 6 ++---- .github/workflows/release.yml | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-package.yml b/.github/workflows/create-package.yml index 07fc669..61a01f2 100644 --- a/.github/workflows/create-package.yml +++ b/.github/workflows/create-package.yml @@ -15,8 +15,6 @@ on: value: ${{ jobs.create_package.outputs.version }} jobs: - # Build and release the Package - # If the repository is not configured properly, this job will be skipped create_package: runs-on: ubuntu-latest env: @@ -62,13 +60,13 @@ jobs: include-files: metaList - name: Upload .unitypackage - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.unityPackage }} path: ${{ env.unityPackage }} - name: Upload .zip - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.zipFile }} path: ${{ env.zipFile }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5eba41..954f948 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,21 @@ jobs: env: packagePath: src/Packages/${{ vars.PACKAGE_NAME }} steps: + - name: Download Package Zip Artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ needs.create_package.outputs.zipArtifact }} + + - name: Download Package UnityPackage Artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ needs.create_package.outputs.unityPackageArtifact }} + + - name: Unzip Artifacts + run: | + unzip ${{ needs.create_package.outputs.zipArtifact }} -d ${{ env.packagePath }} + unzip ${{ needs.create_package.outputs.unityPackageArtifact }} -d ${{ env.packagePath }} + # Make a release tag of the version from the package.json file - name: Create Tag id: tag_version @@ -28,6 +43,5 @@ jobs: with: generate_release_notes: true files: | - ${{ needs.create_package.outputs.zipArtifact }} - ${{ needs.create_package.outputs.unityPackageArtifact }} + "${{ github.workspace }}/${{ env.packagePath }}/**/*" tag_name: ${{ needs.create_package.outputs.version }}