diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 49019380..9f36e8e4 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -5,17 +5,11 @@ permissions: packages: write # Grant write permissions to packages on: - workflow_run: - workflows: ["rust"] #Ensure rust is done - types: - - completed workflow_dispatch: # Manual trigger added jobs: build-runspace: runs-on: ubuntu-latest - outputs: - version: ${{ steps.extract_version.outputs.version }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -24,20 +18,21 @@ jobs: id: extract_version run: | version=$(date +"%Y.%m.%d") - echo "version=$version" >> $GITHUB_ENV - echo "version=$version" >> $GITHUB_OUTPUT + echo "version=$version" >> $env:GITHUB_ENV shell: bash - name: Create and Upload Release id: create_release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ steps.extract_version.outputs.version }} - name: Pre-Release ${{ steps.extract_version.outputs.version }} + tag_name: ${{ env.VERSION }} + name: Pre-Release ${{ env.VERSION }} + body: "![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.VERSION }}/linutil)" + append_body: false files: | ./linutil ./start.sh - generate_release_notes: true prerelease: true + generate_release_notes: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e3485ad1..0e1a755e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -42,5 +42,5 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Replace linutil binary" - file_pattern: linutil + file_pattern: ./linutil commit_options: "--allow-empty --no-verify" \ No newline at end of file diff --git a/src/commands/system-update.sh b/src/commands/system-update.sh index 36b7630d..0b11a51c 100755 --- a/src/commands/system-update.sh +++ b/src/commands/system-update.sh @@ -77,7 +77,9 @@ fastUpdate() { exit 1 fi ${AUR_HELPER} --noconfirm -S rate-mirrors-bin - sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak + if [ -s /etc/pacman.d/mirrorlist ]; then + sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak + fi # If for some reason DTYPE is still unknown use always arch so the rate-mirrors does not fail dtype_local=${DTYPE}