Skip to content

Commit

Permalink
Merge branch 'dev' into FIX_Permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray authored Oct 19, 2024
2 parents a651b08 + edd032f commit 972aecc
Show file tree
Hide file tree
Showing 14 changed files with 189 additions and 213 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/auto_translate.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run Build Tests
on:
push:
branches:
- master
pull_request:
branches:
- dev
workflow_dispatch:

jobs:
build_tests:
strategy:
max-parallel: 2
matrix:
python-version: ["3.10", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt install python3-dev swig libssl-dev
- name: Build Source Packages
run: |
python setup.py sdist
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
- name: Install skill
run: |
pip install .
10 changes: 10 additions & 0 deletions .github/workflows/conventional_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# auto add labels to PRs
on:
pull_request_target:
types: [opened, edited]
name: conventional-release-labels
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: bcoe/conventional-release-labels@v1
12 changes: 0 additions & 12 deletions .github/workflows/license_tests.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/propose_stable_release.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/propose_translation.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/publish_alpha.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/publish_alpha_build.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/pull-request-lint.yml

This file was deleted.

105 changes: 105 additions & 0 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Release Alpha and Propose Stable

on:
pull_request:
types: [closed]
branches: [dev]

jobs:
publish_alpha:
if: github.event.pull_request.merged == true
uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master
secrets: inherit
with:
branch: "dev"
version_file: "skill_randomness/version.py"
setup_py: "setup.py"
update_changelog: true
publish_prerelease: true
changelog_max_issues: 100

notify:
if: github.event.pull_request.merged == true
needs: publish_alpha
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Send message to Matrix bots channel
id: matrix-chat-message
uses: fadenb/matrix-chat-message@v0.0.6
with:
homeserver: "matrix.org"
token: ${{ secrets.MATRIX_TOKEN }}
channel: "!WjxEKjjINpyBRPFgxl:krbel.duckdns.org"
message: |
new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }}
publish_pypi:
needs: publish_alpha
if: success() # Ensure this job only runs if the previous job succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: version
run: echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
id: version
- name: Build Distribution Packages
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{secrets.PYPI_TOKEN}}

propose_release:
needs: publish_alpha
if: success() # Ensure this job only runs if the previous job succeeds
runs-on: ubuntu-latest
steps:
- name: Checkout dev branch
uses: actions/checkout@v4
with:
ref: dev

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Get version from setup.py
id: get_version
run: |
VERSION="$(python setup.py --version)"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create and push new branch
run: |
git checkout -b release-${{ env.VERSION }}
git push origin release-${{ env.VERSION }}
- name: Open Pull Request from dev to master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Variables
BASE_BRANCH="master"
HEAD_BRANCH="release-${{ env.VERSION }}"
PR_TITLE="Release ${{ env.VERSION }}"
PR_BODY="Human review requested!"
# Create a PR using GitHub API
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \
https://api.github.com/repos/${{ github.repository }}/pulls
45 changes: 27 additions & 18 deletions .github/workflows/skill_tests.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 972aecc

Please sign in to comment.