Skip to content

Commit

Permalink
chore(cd): fix cd configuration for deb packages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpasmantier committed Nov 16, 2024
1 parent e9dde70 commit ad34194
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,8 @@ 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 }}
Expand Down Expand Up @@ -223,7 +200,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
Expand All @@ -241,5 +218,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"
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit ad34194

Please sign in to comment.