From 57b6a8fc2b0130fad469e9c0eea365b1d53cb703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Mu=C3=B1oz?= Date: Sat, 1 Feb 2020 00:05:24 +0100 Subject: [PATCH] Delete release.yml --- .github/workflows/release.yml | 99 ----------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4c1f394..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,99 +0,0 @@ -on: - push: - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -name: Create Release - -jobs: - create_release: - runs-on: windows-latest - steps: - - uses: actions/checkout@v1 - - name: Setup Nuget.exe - uses: warrenbuckley/Setup-Nuget@v1 - - name: Restore packages - run: nuget restore ysoserial.sln - - name: Setup MSBuild.exe - uses: warrenbuckley/Setup-MSBuild@v1 - - name: Build with MSBuild - run: msbuild ysoserial.sln -p:Configuration=Release - - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 - with: - name: ysoserial-${{ github.sha }} - path: D:\a\ysoserial.net\ysoserial.net\ysoserial\bin\Release\ - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - # since jobs can not share any variables we have to copy the URL of the created Github release - # into a file and stash it as an artifact - - name: Copy release URL into file - run: | - mkdir release - printf "%s" "${{ steps.create_release.outputs.upload_url }}" > release/url.txt - - name: Stash file containing the release URL as an artifact - uses: actions/upload-artifact@v1 - with: - name: release-url - path: D:\a\ysoserial.net\ysoserial.net\ysoserial\bin\Release\ - - # In this job we upload the release artifacts to the corresponding release - upload: - runs-on: ubuntu-latest - needs: create_release - steps: - # Since Github actions (currently) doesn't provide a slugged version of the git tag we have to - # create it by ourselves. It is then made available to other steps in this job as a step.outputs - # variable - - name: Get the version (git tag) - id: get_version - run: | - echo ${GITHUB_REF/refs\/tags\//} - echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - name: Retrieve stashed intermediary build artifact - uses: actions/download-artifact@v1 - with: - name: ysoserial-${{ github.sha }} - # rename the retrieved intermediary artifact and prepare zip file - - name: Prepare release artifact - env: - VERSION: ${{ steps.get_version.outputs.VERSION }} - run: | - mv ./ysoserial-${{ github.sha }}/* . - zip -j ysoserial-$VERSION.zip ./* - # Download the previously uploaded artifact which contains the release URL - - name: Retrieve stashed release URL - uses: actions/download-artifact@v1 - with: - name: release-url - # Write content of downloaded file (a string which contains the release URL) into a step.outputs variable - - name: Read release URL - id: get_release_url - run: echo ::set-output name=URL::$(cat release-url/url.txt) - # This step is only needed because the upload-release-asset currently doesn't support - # environment variables. Therefore they must be written and referenced through step.outputs - - name: Prepare artifact metadata - id: prepare_artifact_metadata - env: - VERSION: ${{ steps.get_version.outputs.VERSION }} - run: | - echo ::set-output name=ARTIFACT_PATH::./ysoserial-$VERSION.zip - echo ::set-output name=ARTIFACT_NAME::ysoserial-$VERSION.zip - # Finally upload the artifact to the corresponding release - - name: Upload Release Artifact - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release_url.outputs.URL }} - asset_path: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_PATH }} - asset_name: ${{ steps.prepare_artifact_metadata.outputs.ARTIFACT_NAME }} - asset_content_type: application/gzip