From d6b082fcff08fd15910319c319ee2becbd8236a3 Mon Sep 17 00:00:00 2001 From: "J. Fronny" <33260128+JFronny@users.noreply.github.com> Date: Thu, 19 Dec 2019 20:46:42 +0100 Subject: [PATCH] Trying to improve main.yml again --- .github/workflows/main.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fdd2aaa..70991a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,9 +37,23 @@ jobs: [System.IO.File]::WriteAllLines($FilePath, (Get-Content $FilePath), $utf8NoBomEncoding) Write-Host "Remove UTF-8 BOM successfully" } - - uses: matheusalbino/git-commit@v1.0.1 + - name: Create Release + id: create_release + uses: actions/create-release@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - user-name: Equal - user-email: equal@example.com - message: This a commit from Github Actions - github-token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./$Env:GITHUB_WORKSPACE\Release.zip + asset_name: Release.zip + asset_content_type: application/zip