1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
name: CD
on:
release:
types: [published]
push:
tags:
- v*
permissions:
contents: write
jobs:
build:
uses: ./.github/workflows/build.yml
generate_coverage:
uses: ./.github/workflows/generate_coverage.yml
homebrew:
name: Bump Homebrew formula
runs-on: macos-latest
steps:
- name: Update Homebrew formula
if: startsWith(github.ref, 'refs/tags/')
uses: dawidd6/action-homebrew-bump-formula@v7
with:
token: ${{secrets.HOMEBREW_TOKEN}}
formula: taskwarrior-tui
deb:
name: Publish deb package
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- uses: clechasseur/rs-cargo@v4
with:
command: build
args: --release
- name: Install cargo-deb
run: cargo install cargo-deb
- name: Build deb package
run: cargo deb -p taskwarrior-tui -o target/debian/taskwarrior-tui.deb
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: taskwarrior-tui-deb
path: target/debian/taskwarrior-tui.deb
- name: Releasing assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
target/debian/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rpm:
name: Publish rpm package
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- uses: clechasseur/rs-cargo@v4
with:
command: build
args: --release
- name: Install rpm
run: sudo apt-get install rpm
- name: Install cargo-rpm
run: cargo install cargo-rpm
- name: Build rpm package
run: cargo rpm build
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: taskwarrior-tui-rpm
path: target/release/rpmbuild/RPMS/x86_64/taskwarrior-tui-*.x86_64.rpm
- name: Releasing assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
target/release/rpmbuild/RPMS/x86_64/taskwarrior-tui-*.x86_64.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
aur:
name: Publish aur package
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v6
- uses: clechasseur/rs-cargo@v4
with:
command: build
args: --release
- name: Install cargo-aur
run: cargo install cargo-aur
- name: Build aur package
run: cargo aur
|