Replace env var workaround with intended workflow
All checks were successful
Run Tests on Code / run-tests (push) Successful in 12s
All checks were successful
Run Tests on Code / run-tests (push) Successful in 12s
This commit is contained in:
parent
b4141e6e6e
commit
b7917aa087
2 changed files with 12 additions and 13 deletions
|
@ -61,14 +61,15 @@ jobs:
|
||||||
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
|
||||||
run: |
|
run: |
|
||||||
cargo deb
|
cargo deb
|
||||||
DEBIAN_REF=$(echo ${{ github.ref_name }} | tr - \~)
|
DEBIAN_REF=$(echo ${{ github.ref_name }} | tr - \~)
|
||||||
echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env
|
echo "debian_ref=$DEBIAN_REF" >> ${{ env.GITHUB_OUTPUT }}
|
||||||
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||||
echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env
|
echo "debian_rev=$DEBIAN_REV" >> ${{ env.GITHUB_OUTPUT }}
|
||||||
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" >> dist/build.env
|
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
|
||||||
|
@ -109,22 +110,22 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
source release_blobs/build.env
|
source release_blobs/build.env
|
||||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release_blobs/${{ DEBIAN_NAME }}_'${{ DEBIAN_REF }}${{ DEBIAN_REV }}'_amd64.deb \
|
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_'${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}'_amd64.deb \
|
||||||
https://forgejo.neshweb.net/api/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload'
|
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload'
|
||||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release_blobs/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \
|
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}_amd64.deb \
|
||||||
https://forgejo.neshweb.net/api/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: |
|
||||||
source release_blobs/build.env
|
source release_blobs/build.env
|
||||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release_blobs/${{ DEBIAN_NAME }}_'${{ DEBIAN_REF }}${{ DEBIAN_REV }}'_amd64.deb \
|
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_'${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}'_amd64.deb \
|
||||||
https://forgejo.neshweb.net/api/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload'
|
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload'
|
||||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||||
--upload-file release_blobs/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \
|
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}_amd64.deb \
|
||||||
https://forgejo.neshweb.net/api/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload
|
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload
|
||||||
|
|
||||||
create-release:
|
create-release:
|
||||||
needs: build
|
needs: build
|
||||||
|
|
|
@ -54,9 +54,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cargo deb
|
cargo deb
|
||||||
DEBIAN_REF=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " " | tr - \~)
|
DEBIAN_REF=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " " | tr - \~)
|
||||||
echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env
|
|
||||||
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||||
echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue