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 packages: write # Grant write permissions to packages
on: on:
workflow_run:
workflows: ["rust"] #Ensure rust is done
types:
- completed
workflow_dispatch: # Manual trigger added workflow_dispatch: # Manual trigger added
jobs: jobs:
build-runspace: build-runspace:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
version: ${{ steps.extract_version.outputs.version }}
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -24,20 +18,21 @@ jobs:
id: extract_version id: extract_version
run: | run: |
version=$(date +"%Y.%m.%d") version=$(date +"%Y.%m.%d")
echo "version=$version" >> $GITHUB_ENV echo "version=$version" >> $env:GITHUB_ENV
echo "version=$version" >> $GITHUB_OUTPUT
shell: bash shell: bash
- name: Create and Upload Release - name: Create and Upload Release
id: create_release id: create_release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ steps.extract_version.outputs.version }} tag_name: ${{ env.VERSION }}
name: Pre-Release ${{ steps.extract_version.outputs.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: | files: |
./linutil ./linutil
./start.sh ./start.sh
generate_release_notes: true
prerelease: true prerelease: true
generate_release_notes: true
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -42,5 +42,5 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: "Replace linutil binary" commit_message: "Replace linutil binary"
file_pattern: linutil file_pattern: ./linutil
commit_options: "--allow-empty --no-verify" commit_options: "--allow-empty --no-verify"

View File

@ -77,7 +77,9 @@ fastUpdate() {
exit 1 exit 1
fi fi
${AUR_HELPER} --noconfirm -S rate-mirrors-bin ${AUR_HELPER} --noconfirm -S rate-mirrors-bin
if [ -s /etc/pacman.d/mirrorlist ]; then
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak 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 # If for some reason DTYPE is still unknown use always arch so the rate-mirrors does not fail
dtype_local=${DTYPE} dtype_local=${DTYPE}