From 0ac0d91fb8adea06362203420fdccb3a712cbc30 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Mon, 16 Sep 2024 15:52:48 -0500 Subject: [PATCH] update linutil release --- .github/workflows/linutil.yml | 36 +++++++++++++++++++ .github/workflows/pre-release.yaml | 55 ------------------------------ 2 files changed, 36 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/pre-release.yaml diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index d173b966..eea43c36 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -59,3 +59,39 @@ jobs: file_pattern: "build/linutil" add_options: '--force' if: success() + + - name: Extract Version + id: extract_version + run: | + version=$(date +"%Y.%m.%d") + echo "version=$version" >> $GITHUB_ENV + shell: bash + + - name: Generate Release Notes + id: generate_notes + uses: release-drafter/release-drafter@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + config-name: release-drafter.yml + version: ${{ env.version }} + + - name: Create and Upload Release + id: create_release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.version }} + name: Pre-Release ${{ env.version }} + body: | + ${{ steps.generate_notes.outputs.body }} + + ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil) + append_body: false + files: | + ./build/linutil + ./start.sh + ./startdev.sh + prerelease: true + env: + version: ${{ env.version }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml deleted file mode 100644 index 5e4b139e..00000000 --- a/.github/workflows/pre-release.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: Pre-Release LinUtil - -permissions: - contents: write # Grant write permissions to contents - packages: write # Grant write permissions to packages - -on: - workflow_dispatch: # Manual trigger added - workflow_run: - workflows: ["LinUtil Release"] - types: - - completed - -jobs: - build-runspace: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Extract Version - id: extract_version - run: | - version=$(date +"%Y.%m.%d") - echo "version=$version" >> $GITHUB_ENV - shell: bash - - - name: Generate Release Notes - id: generate_notes - uses: release-drafter/release-drafter@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - config-name: release-drafter.yml - version: ${{ env.version }} - - - name: Create and Upload Release - id: create_release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ env.version }} - name: Pre-Release ${{ env.version }} - body: | - ${{ steps.generate_notes.outputs.body }} - - ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil) - append_body: false - files: | - ./build/linutil - ./start.sh - ./startdev.sh - prerelease: true - env: - version: ${{ env.version }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}