From d17aae5d6542c1b02729584ca010544cf10ca335 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sun, 20 Mar 2022 15:40:23 +0100 Subject: [PATCH] First Release? --- .github/workflows/push.yml | 48 +++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b11a49930..3dc056912 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest permissions: actions: read - contents: read + contents: write security-events: write strategy: fail-fast: false @@ -48,20 +48,56 @@ jobs: - name: Run tests run: ctest - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - - name: Build deb package run: sh packaging/deb/create.sh . + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + - name: Upload binary - uses: actions/upload-artifact@v2 + if: ${{ github.event_name == "push" }} + uses: actions/upload-artifact@v3 with: name: fastfetch path: ./fastfetch - name: Upload deb package - uses: actions/upload-artifact@v2 + if: ${{ github.event_name == "push" }} + uses: actions/upload-artifact@v3 with: name: fastfetch.deb path: ./packaging/deb/fastfetch.deb + + deploy: + name: "Create GitHub release" + runs-on: ubuntu-latest + needs: check + if: ${{ github.event_name == "push" }} + steps: + - name: "Download binary" + uses: actions/download-artifact@v3 + with: + name: fastfetch + path: ./fastfetch + + - name: "Download deb package" + uses: actions/download-artifact@v3 + with: + name: fastfetch.deb + path: ./fastfetch.deb + + - name: "Get latest release version" + id: get_version + uses: pozetroninc/github-action-get-latest-release@master + with: + repository: ${{ github.repository }} + + - name: "Create GitHub release" + if: steps.get_version.outputs.release != $(./fastfetch --version) + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ $(./fastfetch --version) }} + generate_release_notes: true + files: | + ./fastfetch + ./fastfetch.deb