-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add gh actions worfklow files (#7)
* feat(ci): add gh actions worfklow files * fix(ci): try to fix detached head * fix(ci): fix wrong branch * fix(ci): rebase from origin * fix(ci): add dummy git user
- Loading branch information
1 parent
f19d7ca
commit 4c39926
Showing
3 changed files
with
128 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,38 @@ | ||
name: Python Package Release Test | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, edited] | ||
jobs: | ||
test-release: | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup dummy git user | ||
run: | | ||
git config --global user.email "action@github.com" | ||
git config --global user.name "GitHub Action" | ||
- name: Checkout main and rebase | ||
run: | | ||
git checkout main | ||
git rebase origin/${{ github.head_ref }} | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
cache: 'poetry' | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@v9.8.8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-vv --noop" |
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,31 @@ | ||
name: Python Package Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
concurrency: release | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
cache: 'poetry' | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@v9.8.8 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
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