Skip to content

Commit

Permalink
chore: testing fpm build
Browse files Browse the repository at this point in the history
  • Loading branch information
vncsmyrnk committed Oct 13, 2024
1 parent 0862f5a commit 2aee2be
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 69 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI workflow

on:
push:
branches: [ "main" ]
# branches: [ "main" ]
pull_request:
branches: [ "main" ]
# branches: [ "main" ]

jobs:
ci:
Expand Down
79 changes: 12 additions & 67 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ name: Release workflow

on:
push:
tags:
- '*'
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# tags:
# - '*'

permissions:
contents: write
Expand Down Expand Up @@ -47,6 +50,13 @@ jobs:
name: documentation
path: ./todayiwill/target/doc

- name: Build deb package
run: |
cd ..
apt-get install ruby-dev build-essential
gem install --no-document fpm
make build-deb
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -55,68 +65,3 @@ jobs:
./todayiwill/target/release
./install-*
./uninstall-*
release:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download build artifact
id: download-build-artifact
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts

- name: List build artifacts generated
run: ls ./artifacts/**/*

- name: Download documentation artifact
id: download-documentation-artifact
uses: actions/download-artifact@v4
with:
name: documentation
path: documentation

- name: List documentation generated
run: ls ./documentation/**/*

- name: Setup Pages for documentation
uses: actions/configure-pages@v3

- name: Upload documentation to pages
uses: actions/upload-pages-artifact@v3
with:
path: ./documentation

- name: Deploy documentation to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
draft: true
prerelease: false
files: |
artifacts/todayiwill/target/release/todayiwill
artifacts/PKGBUILD
artifacts/install-*
artifacts/uninstall-*
body: |
# Changelog
${{ steps.github_release.outputs.changelog }}
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build:
@sed -i "s/^version =.*/version = \"$(VERSION)\"/g" todayiwill/Cargo.toml
cargo build --release

build-doc:
cargo doc --no-deps
@echo '<meta http-equiv="refresh" content="0;url=todayiwill/index.html">' > target/doc/index.html

build-deb:
fpm -s dir \
-t deb \
-n todayiwill \
-v $(VERSION) \
--license glp3 \
--description "A CLI reminder app that offers a simple yet powerful solution to enhance productivity and ensure that you stay on top of your daily responsibilities" \
--maintainer "Vinicius Mayrink <vncsmyrnk@gmail.com>" \
target/release/todayiwill=/usr/bin/todayiwill

0 comments on commit 2aee2be

Please sign in to comment.