Attempt to run build only on releases and generate an actual release with artifacts
All checks were successful
/ cargo test (push) Successful in 21s
All checks were successful
/ cargo test (push) Successful in 21s
This commit is contained in:
parent
5600c653ef
commit
b9c200ab2c
3 changed files with 43 additions and 28 deletions
34
.forgejo/workflows/release.yml
Normal file
34
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
on: [tag]
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
name: docker build
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME}}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN}}
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: false
|
||||||
|
tags: karcsesz/fingerlink:latest
|
||||||
|
- uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
push: false
|
||||||
|
tags: karcsesz/fingerlink:latest-nano
|
||||||
|
build-args: "editor=nano"
|
||||||
|
binary:
|
||||||
|
name: raw artifact
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: "x86_64-unknown-linux-musl,aarch64-unknown-linux-musl"
|
||||||
|
- run: cargo build --release --target x86_64-unknown-linux-musl
|
||||||
|
- run: cargo build --release --target aarch64-unknown-linux-musl
|
||||||
|
- run: mkdir _release && mv target/x86_64-unknown-linux-musl/release/fingerlink _release/fingerlink-x86_64 && mv target/aarch64-unknown-linux-musl/release/fingerlink-arm64
|
||||||
|
- uses: actions/forgejo-release@v1
|
||||||
|
with:
|
||||||
|
direction: upload
|
||||||
|
release-dir: _release
|
|
@ -1,28 +0,0 @@
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: cargo test
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/rust-toolchain@stable
|
|
||||||
- run: cargo test --all-features
|
|
||||||
docker:
|
|
||||||
name: docker build
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
needs:
|
|
||||||
- test
|
|
||||||
steps:
|
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME}}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN}}
|
|
||||||
- uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
push: false
|
|
||||||
tags: karcsesz/fingerlink:latest
|
|
||||||
- uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
push: false
|
|
||||||
tags: karcsesz/fingerlink:latest-nano
|
|
||||||
build-args: "editor=nano"
|
|
9
.forgejo/workflows/test_on_push.yml
Normal file
9
.forgejo/workflows/test_on_push.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: cargo test
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/rust-toolchain@stable
|
||||||
|
- run: cargo test --all-features
|
Loading…
Reference in a new issue