From dcf9f6a62156f425e378ac346ad6f18466076356 Mon Sep 17 00:00:00 2001 From: Alexandre Pasmantier Date: Sat, 16 Nov 2024 17:13:50 +0100 Subject: [PATCH] chore(cd): fix cd configuration for deb packages --- .github/workflows/cd.yml | 29 ++--------------------------- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c9f5b18..51bb531 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,35 +7,11 @@ on: tags: - '[v]?[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: - inputs: - tags: - description: 'Tags to deploy' - required: true - default: 'v0.0.0' jobs: - create-release: - name: create-release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Get the release version from the tag - if: env.VERSION == '' - run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV - - name: Show the version - run: | - echo "version is: $VERSION" - - name: Create GitHub release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create $VERSION --draft --verify-tag --title $VERSION - outputs: - version: ${{ env.VERSION }} - publish-release: name: Publishing for ${{ matrix.os }} - needs: ['create-release'] runs-on: ${{ matrix.os }} strategy: @@ -164,7 +140,6 @@ jobs: publish-release-deb: name: publish-release-deb - needs: ['create-release'] runs-on: ubuntu-latest env: TARGET: x86_64-unknown-linux-musl @@ -223,7 +198,7 @@ jobs: shell: bash run: | cargo deb --profile deb --target ${{ env.TARGET }} - version="${{ needs.create-release.outputs.version }}" + version="${{ github.ref_name }}" echo "DEB_DIR=target/${{ env.TARGET }}/debian" >> $GITHUB_ENV echo "DEB_NAME=television_$version-1_amd64.deb" >> $GITHUB_ENV @@ -241,5 +216,5 @@ jobs: shell: bash run: | cd "$DEB_DIR" - version="${{ needs.create-release.outputs.version }}" + version="${{ github.ref_name }}" gh release upload "$version" "$DEB_NAME" "$SUM" diff --git a/Cargo.lock b/Cargo.lock index 307c989..f9c060e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2963,7 +2963,7 @@ dependencies = [ [[package]] name = "television" -version = "0.4.21" +version = "0.4.22" dependencies = [ "anyhow", "better-panic", diff --git a/Cargo.toml b/Cargo.toml index 306e78b..06120f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "television" -version = "0.4.21" +version = "0.4.22" edition = "2021" description = "The revolution will be televised." license = "MIT"