From d57770a30fc9705b1360eb3adc966c4722eaf40c Mon Sep 17 00:00:00 2001 From: MCrow Date: Fri, 20 Dec 2024 22:20:58 +0100 Subject: [PATCH] update workflow files --- .github/workflows/create-github-release.yml | 75 --------------------- .github/workflows/rocket-plugin-release.yml | 11 +++ 2 files changed, 11 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/create-github-release.yml create mode 100644 .github/workflows/rocket-plugin-release.yml diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml deleted file mode 100644 index 63cba60..0000000 --- a/.github/workflows/create-github-release.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Create GitHub Release - -on: - push: - branches: - - master - paths: - - MoreHomes/** -jobs: - build: - name: Create GitHub Release - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Get version - id: package_version - uses: KageKirin/get-csproj-version@v0 - with: - file: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.csproj - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.x - - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --configuration Release --no-restore - - - name: Install zip - run: sudo apt-get install zip - - - name: Zip Rocket release artifacts - env: - BUILD_DIRECTORY: "./${{ github.event.repository.name }}/bin/Release/net48/" - PLUGIN_FILE_NAME: "${{ github.event.repository.name }}.dll" - run: | - mkdir -p ./release-template/Plugins ./release-template/Libraries - mv $BUILD_DIRECTORY/$PLUGIN_FILE_NAME ./release-template/Plugins/ - [ -f $BUILD_DIRECTORY/*.dll ] && mv $BUILD_DIRECTORY/*.dll ./release-template/Libraries/ - cd ./release-template/ - zip -qr ./../release.zip * - shell: bash - - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.package_version.outputs.version }} - release_name: "${{ github.event.repository.name }} v${{ steps.package_version.outputs.version }}" - draft: true - prerelease: false - - - name: Upload Rocket release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./release.zip - asset_name: "/${{ github.event.repository.name }}-v${{ steps.package_version.outputs.version }}.zip" - asset_content_type: application/zip - - - uses: eregon/publish-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} - diff --git a/.github/workflows/rocket-plugin-release.yml b/.github/workflows/rocket-plugin-release.yml new file mode 100644 index 0000000..fa35591 --- /dev/null +++ b/.github/workflows/rocket-plugin-release.yml @@ -0,0 +1,11 @@ +name: Build & Create GitHub Release + +on: + workflow_dispatch: + push: + branches: + - master + +jobs: + call-rocket-plugin-release: + uses: RestoreMonarchyPlugins/github-actions/.github/workflows/rocket-plugin-release.yml@master