-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add ci for test and release
- Loading branch information
1 parent
6f3f9a1
commit 5f333cc
Showing
5 changed files
with
127 additions
and
8 deletions.
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,36 @@ | ||
# Build and publish a release of Gamescope DBus using semantic-release whenever | ||
# changes are merged into main. | ||
name: "🎉 Release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v0.x | ||
- v1.x | ||
paths-ignore: | ||
- README.md | ||
- "docs/**" | ||
|
||
# Jobs to run | ||
jobs: | ||
release: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install Dependencies | ||
run: npm install @semantic-release/exec @google/semantic-release-replace-plugin @semantic-release/git | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make sem-release |
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,13 @@ | ||
name: 🪲 Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
run-tests: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: | | ||
make in-docker TARGET='test' |
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,52 @@ | ||
# Semantic Release Configuration | ||
# https://semantic-release.gitbook.io/semantic-release/usage/configuration | ||
|
||
# Any merges into branches that match these patterns will trigger a release. | ||
branches: | ||
- name: main | ||
#- name: 'v+([0-9])?(.{+([0-9]),x}).x' | ||
|
||
# These plugins will run when a release is triggered. They will analyze commit | ||
# messages to determine what kind of release this is and publish a new release. | ||
plugins: | ||
# Analyze commit messages to determine next version | ||
- "@semantic-release/commit-analyzer" | ||
|
||
# Generate release notes | ||
- "@semantic-release/release-notes-generator" | ||
|
||
# Replace version strings in the project. The 'git' plugin is needed to | ||
# commit the version strings to the repository. | ||
- - "@google/semantic-release-replace-plugin" | ||
- replacements: | ||
- files: | ||
- Cargo.toml | ||
from: '^version = .*"$' | ||
to: 'version = "${nextRelease.version}"' | ||
#results: | ||
# - file: Cargo.toml | ||
# hasChanged: true | ||
# numMatches: 1 | ||
# numReplacements: 1 | ||
#countMatches: true | ||
|
||
# Commit the following changes to git after other plugins have run | ||
- - "@semantic-release/git" | ||
- assets: | ||
- Cargo.toml | ||
- Cargo.lock | ||
|
||
# Execute commands to build the project | ||
- - "@semantic-release/exec" | ||
- shell: true | ||
prepareCmd: "make in-docker TARGET='dist'" | ||
|
||
# Publish artifacts as a GitHub release | ||
- - "@semantic-release/github" | ||
- assets: | ||
- path: dist/inputplumber-*.rpm | ||
- path: dist/inputplumber-*.rpm.sha256.txt | ||
- path: dist/inputplumber.tar.gz | ||
- path: dist/inputplumber.tar.gz.sha256.txt | ||
- path: dist/inputplumber.raw | ||
- path: dist/inputplumber.raw.sha256.txt |
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
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