-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After `git push --tags`, a new deb and rpm will be published in github release. [AUR](https://aur.archlinux.org/packages/g3kb-switch) will be updated, if AUR_SSH_PRIVATE_KEY have been added to github secret
- Loading branch information
Showing
3 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
- package-ecosystem: gitsubmodule | ||
directory: / | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
"on": | ||
push: | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
paths-ignore: | ||
- "**.md" | ||
workflow_dispatch: | ||
|
||
# https://github.com/softprops/action-gh-release/issues/236 | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install rpm | ||
- name: Build | ||
run: | | ||
cmake -Bbuild | ||
cmake --build build | ||
cmake --build build | ||
# TODO: disable ctest because we haven't add any test | ||
# ctest --test-dir build | ||
cd build | ||
cpack -G DEB | ||
cpack -G RPM | ||
# TODO: disable codecov because we disable ctest | ||
# - uses: codecov/codecov-action@v3 | ||
# with: | ||
# gcov: true | ||
- uses: actions/upload-artifact@v3 | ||
if: "! startsWith(github.ref, 'refs/tags/')" | ||
with: | ||
path: | | ||
build/*.deb | ||
build/*.rpm | ||
- uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
build/*.deb | ||
build/*.rpm | ||
deploy-aur: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: Freed-Wu/update-aur-package@v1.0.11 | ||
with: | ||
package_name: g3kb-switch | ||
ssh_private_key: ${{secrets.AUR_SSH_PRIVATE_KEY}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters