Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
atareao committed Sep 8, 2024
2 parents 1a820f1 + 3623357 commit 50ee557
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/autoassign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Issue assignment

on:
issues:
types:
- opened

jobs:
auto-assign:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v2
with:
assignees: atareao
numOfAssignee: 1
allowSelfAssign: true
93 changes: 93 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Bump version workflow

on:
push:
branches:
- development

env:
GH_TOKEN: ${{ github.token }}

jobs:
bump_version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
ref: development
- name: Get action from comments
id: get_action
run: |
comments=$(git log --pretty=format:"%s" -1)
echo "Comments: ${comments}"
if [[ "$comments" =~ \#major ]]; then
action="major"
elif [[ "$comments" =~ \#minor ]]; then
action="minor"
elif [[ "$comments" =~ \#patch ]]; then
action="patch"
else
action="none"
fi
echo "action=${action}" >> $GITHUB_OUTPUT
echo "Selected action: ${action}"
- name: Install the latest version of rye
id: install_rye
if: ${{ steps.get_action.outputs.action != 'none' }}
uses: eifinger/setup-rye@v4
- name: Get current version
id: get_current_version
if: ${{ steps.get_action.outputs.action != 'none' }}
run: |
current_version=$(rye version)
echo "current_version=${current_version}" >> $GITHUB_OUTPUT
- name: Merge development into main
if: ${{ steps.get_action.outputs.action != 'none' }}
uses: devmasx/merge-branch@master
with:
type: now
from_branch: development
target_branch: main
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: bump version
id: bump_version
if: ${{ steps.get_action.outputs.action != 'none' }}
run: |
action=${{ steps.get_action.outputs.action }}
rye version -b $action
new_version=$(rye version)
echo "new_version=${new_version}" >> $GITHUB_OUTPUT
- name: commit
uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.get_action.outputs.action != 'none' }}
with:
commit_message: "Bump version from ${{ steps.get_current_version.outputs.current_version}} to ${{ steps.bump_version.outputs.new_version }}"
- name: checkout main
uses: actions/checkout@v4
with:
ref: main
- name: create tag
id: create_tag
if: ${{ steps.get_action.outputs.action != 'none' }}
run: |
current_version=${{ steps.get_current_version.outputs.current_version }}
github_actor=${{ github.actor }}
git config user.name "${github_actor}"
git config user.email "${github_actor}@users.noreply.github.com"
git tag -a "v${current_version}" -m "Bump version to ${current_version}"
git push origin "v${current_version}"
gh release create "v${current_version}" --title "v${current_version}" --notes "Bump version to ${current_version}"
- name: exit code
id: exit_code
run: |
action=${{ steps.get_action.outputs.action }}
if [[ "$action" == "none" ]]; then
echo "Not created new release"
exit 1
fi
echo "Created new release"
exit 0
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish PPA
on:
push:
branches:
- main

jobs:
publish-ppa:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Publish PPA
uses: atareao/publish-ppa-package-from-source@v1
with:
repository: "atareao/atareao"
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
deb_email: "[email protected]"
deb_fullname: "Lorenzo Carbonell"

0 comments on commit 50ee557

Please sign in to comment.