forked from ChrisTitusTech/linutil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into alpine
- Loading branch information
Showing
30 changed files
with
444 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,19 +46,9 @@ jobs: | |
run: cargo build --target-dir=build --release --verbose --target=x86_64-unknown-linux-musl --all-features | ||
|
||
- name: Build aarch64 binary | ||
run: cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features | ||
|
||
- name: Move binaries to build directory | ||
run: | | ||
mv build/x86_64-unknown-linux-musl/release/linutil build/linutil | ||
mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64 | ||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Commit Linutil | ||
file_pattern: "build/linutil build/linutil-aarch64" | ||
add_options: '--force' | ||
if: success() | ||
cross build --target-dir=build --release --verbose --target=aarch64-unknown-linux-musl --all-features | ||
mv ./build/aarch64-unknown-linux-musl/release/linutil ./build/aarch64-unknown-linux-musl/release/linutil-aarch64 | ||
- name: Extract Version | ||
id: extract_version | ||
|
@@ -80,32 +70,11 @@ jobs: | |
append_body: true | ||
generate_release_notes: true | ||
files: | | ||
./build/linutil | ||
./build/linutil-aarch64 | ||
./build/x86_64-unknown-linux-musl/release/linutil | ||
./build/aarch64-unknown-linux-musl/release/linutil-aarch64 | ||
./start.sh | ||
./startdev.sh | ||
prerelease: true | ||
env: | ||
version: ${{ env.version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Preview | ||
run: | | ||
echo "$(pwd)/build" >> $GITHUB_PATH | ||
- name: Generate preview | ||
uses: charmbracelet/[email protected] | ||
with: | ||
path: "docs/assets/preview.tape" | ||
|
||
- name: Move preview | ||
run: | | ||
mv preview.gif docs/assets/preview.gif | ||
- name: Upload preview | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Preview for ${{ env.version }} | ||
file_pattern: "docs/assets/preview.gif" | ||
add_options: "--force" | ||
if: success() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: LinUtil Preview | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Tag name' | ||
required: true | ||
workflow_run: | ||
workflows: ["LinUtil Release"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
generate_preview: | ||
runs-on: ubuntu-latest | ||
environment: linutil_env | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get tag name ( Workflow Run ) | ||
id: latest_tag | ||
uses: actions/github-script@v7 | ||
if: github.event_name == 'workflow_run' | ||
with: | ||
script: | | ||
const releases = await github.rest.repos.listReleases({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
per_page: 1 | ||
}); | ||
core.setOutput('result', releases.data[0].tag_name); | ||
result-encoding: string | ||
|
||
- name: Set tag name ( Workflow Run ) | ||
if: github.event_name == 'workflow_run' | ||
run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_ENV | ||
|
||
- name: Set tag name ( Workflow Dispatch ) | ||
if: ${{ github.event_name }} == 'workflow_dispatch' | ||
run: echo "tag_name=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV | ||
|
||
- name: Download binary | ||
run: | | ||
curl -LO "https://github.com/${{ github.repository }}/releases/download/${{ env.tag_name }}/linutil" | ||
- name: Set env | ||
run: | | ||
chmod +x linutil | ||
mkdir -p build | ||
mv linutil build/linutil | ||
echo "${{ github.workspace }}/build" >> $GITHUB_PATH | ||
- name: Generate preview | ||
uses: charmbracelet/[email protected] | ||
with: | ||
path: "docs/assets/preview.tape" | ||
|
||
- name: Move preview | ||
run: mv preview.gif docs/assets/preview.gif | ||
|
||
- name: Create PR | ||
uses: peter-evans/[email protected] | ||
with: | ||
commit-message: Preview for ${{ env.tag_name }} | ||
file-pattern: "docs/assets/preview.gif" | ||
add-options: "--force" | ||
token: ${{ secrets.PAT_TOKEN }} | ||
branch: feature/preview-${{ env.tag_name }} | ||
title: "Update preview for ${{ env.tag_name }}" | ||
body: | | ||
Automated PR to update preview gif for version ${{ env.tag_name }} | ||
if: success() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
external-sources=true | ||
source=core/tabs/common-script.sh |
Oops, something went wrong.