linutil/.github/workflows/pre-release.yaml

43 lines
1.4 KiB
YAML
Raw Normal View History

2024-07-14 01:14:19 +01:00
name: Pre-Release LinUtil
2024-07-14 01:36:04 +01:00
permissions:
contents: write # Grant write permissions to contents
packages: write # Grant write permissions to packages
2024-07-14 01:36:04 +01:00
2024-07-14 01:14:19 +01:00
on:
workflow_dispatch: # Manual trigger added
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")
2024-07-18 22:39:44 +01:00
echo "version=$version" >> $GITHUB_ENV
2024-07-14 01:14:19 +01:00
shell: bash
2024-07-30 22:04:31 +01:00
- name: Rename aarch64 binary for release
run: mv ./build/aarch64-unknown-linux-musl/release/linutil ./build/aarch64-unknown-linux-musl/release/linutil-aarch64
2024-07-14 01:14:19 +01:00
- name: Create and Upload Release
id: create_release
uses: softprops/action-gh-release@v2
with:
2024-07-18 22:53:40 +01:00
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)"
2024-07-18 21:44:20 +01:00
append_body: false
2024-07-14 02:07:34 +01:00
files: |
./build/x86_64-unknown-linux-musl/release/linutil
2024-07-30 22:04:31 +01:00
./build/aarch64-unknown-linux-musl/release/linutil-aarch64
2024-07-14 01:14:19 +01:00
prerelease: true
2024-07-18 21:44:20 +01:00
generate_release_notes: true
2024-07-14 01:14:19 +01:00
env:
2024-07-18 22:53:40 +01:00
version: ${{ env.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}