From 7f342b7862da39b31855ab4373a23548b31137ec Mon Sep 17 00:00:00 2001 From: Bipin <87369440+bipinkrish@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:20:09 +0530 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 57 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1bcdd86..5495eb6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,11 @@ -name: Executable Build +name: Executable Build and Release on: workflow_dispatch: jobs: build: + name: Build strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] @@ -41,4 +42,56 @@ jobs: path: | build/*.exe build/*.bin - build/*.app/**/* \ No newline at end of file + build/*.app/**/* + + release: + permissions: write-all + name: Release + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + - name: Display structure of downloaded files + run: ls -R + + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: Latest Release + tag_name: ${{ github.ref }} + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: upload linux artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: .*.bin + asset_name: DeGourou + asset_content_type: application/gzip + + # - name: upload darwin artifact + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./bin/azblogfilter.darwin-amd64.tar.gz + # asset_name: azblogfilter.darwin-amd64.tar.gz + # asset_content_type: application/gzip + + - name: upload windows artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: .*.exe + asset_name: DeGourou.exe + asset_content_type: application/zip