Formatting Changes

This commit is contained in:
Neshura 2024-08-07 19:51:59 +02:00
parent 713bbb550a
commit a6b35ec488
Signed by: Neshura
GPG key ID: 4E2D47B1374C297D
3 changed files with 30 additions and 36 deletions

View file

@ -106,11 +106,9 @@ jobs:
if: success() if: success()
runs-on: docker runs-on: docker
steps: steps:
- - name: Downloading All Build Artifacts
name: Downloading All Build Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
- - name: Upload Debian Package to staging
name: Upload Debian Package to staging
run: | run: |
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_'${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}'_amd64.deb \ --upload-file release_blobs/${{ needs.build.outputs.debian_name }}_'${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}'_amd64.deb \
@ -118,8 +116,8 @@ jobs:
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}_amd64.deb \ --upload-file release_blobs/${{ needs.build.outputs.debian_name }}_${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}_amd64.deb \
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload ${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload
-
name: Upload Debian Package to main - name: Upload Debian Package to main
if: (! contains(github.ref_name, '-rc')) if: (! contains(github.ref_name, '-rc'))
run: | run: |
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
@ -134,11 +132,10 @@ jobs:
if: success() if: success()
runs-on: docker runs-on: docker
steps: steps:
- - name: Downloading All Build Artifacts
name: Downloading All Build Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
-
name: Release New Version - name: Release New Version
uses: actions/forgejo-release@v2 uses: actions/forgejo-release@v2
with: with:
direction: upload direction: upload

View file

@ -11,14 +11,13 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Add Clippy
name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
-
name: Checking Out Repository Code - name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache - name: Set Up Cargo Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
@ -28,8 +27,8 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy - name: Run Clippy
run: cargo clippy run: cargo clippy
build: build:
@ -42,19 +41,18 @@ jobs:
DEBIAN_REV: ${{ steps.deb_bundle.outputs.debian_rev }} DEBIAN_REV: ${{ steps.deb_bundle.outputs.debian_rev }}
DEBIAN_REF: ${{ steps.deb_bundle.outputs.debian_ref }} DEBIAN_REF: ${{ steps.deb_bundle.outputs.debian_ref }}
steps: steps:
- - name: Checking Out Repository Code
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Prepare build environment - name: Prepare build environment
run: mkdir dist run: mkdir dist
-
name: Compiling To Linux Target - name: Compiling To Linux Target
run: | run: |
cargo build -r cargo build -r
mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64 mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64
-
name: Bundle .deb package - name: Bundle .deb package
id: deb_bundle id: deb_bundle
run: | run: |
cargo deb cargo deb
@ -65,8 +63,8 @@ jobs:
DEBIAN_NAME=-$(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ") DEBIAN_NAME=-$(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ")
echo "debian_name=$DEBIAN_NAME" >> ${{ env.GITHUB_OUTPUT }} echo "debian_name=$DEBIAN_NAME" >> ${{ env.GITHUB_OUTPUT }}
mv target/debian/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb mv target/debian/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb
-
name: Uploading Build Artifact - name: Uploading Build Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: release_blobs name: release_blobs

View file

@ -12,14 +12,13 @@ jobs:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps: steps:
- - name: Add Clippy
name: Add Clippy
run: rustup component add clippy run: rustup component add clippy
-
name: Checking Out Repository Code - name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache - name: Set Up Cargo Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
@ -29,6 +28,6 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy - name: Run Clippy
run: cargo clippy run: cargo clippy