update github actions

This commit is contained in:
Chris Titus 2024-07-18 15:44:20 -05:00
parent 518531f448
commit c329c6af49
3 changed files with 10 additions and 13 deletions

View File

@ -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 }}

View File

@ -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"

View File

@ -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}