Skip to content

Commit

Permalink
Create Automatic Releases (#189)
Browse files Browse the repository at this point in the history
* test build a wheel

* test auto create issue

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* Update test_gh_cli.yml

* testing releases

* test creating a wheel

* Update create_release.yml

* Update create_release.yml

* Update create_release.yml

* Update create_release.yml

* Update pyproject.toml

feat(package): add semantic verisioning

* feat: added semantic releases

* fix: test semantic versioning on test branch

* fix: again attempt to get sv to run on test branch

* fix:

* test new message

* fix: add wheel to build

* test new message

* Update test.txt

* fix: update name of release

* test new message

* fix: run only on main

* fix: address changes to actions and pyproject.toml

* fix: update matrix to stay within project supported versions

* fix: fix python version again

* fix: test why python 3.12 keeps being activated

* Update pyproject.toml

* fix: remake github actions to mirror e4e deduplicate action

* fix: change ref

* fix: remove build command

* Update create_release.yml

* Update create_release.yml

* 0.1.0-rc.4

Automatically generated by python-semantic-release

* fix: remove commit message

* fix: disable changelog

* Create TEST.txt

* feat: test

* feat: TEST

* fix: update release conditions

* Update create_release.yml

* test: update test

* fix: adjust release output

* test: try out how to send data over

* test: remove changelog

* fix: test again

* 0.1.0-rc.10

Automatically generated by python-semantic-release

* fix: revert release change

* 0.1.0-rc.11

Automatically generated by python-semantic-release

* fix: return it to how it is in dedup example, and hope

* fix: fix refs

* doc: remove extra comments

* fix: swap back to main

* Delete TEST.txt

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: semantic-release <semantic-release>
  • Loading branch information
Sean1572 and github-actions committed Jun 1, 2024
1 parent dfc0d7e commit 59e89ef
Show file tree
Hide file tree
Showing 5 changed files with 1,488 additions and 24 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Release

on:
# - push
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
ref: main

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: check release state
run: |
echo "release: ${{ steps.release.outputs.released}}"
outputs:
release: ${{steps.release.outputs.released }}

build_wheels:
name: Build wheels on ${{ matrix.python-version }}
needs: [release]
runs-on: ubuntu-latest
if: needs.release.outputs.release == 'true'
strategy:
matrix:
python-version: ["3.9", "3.10"]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: main
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create wheel
run: |
python -m pip install --upgrade pip poetry
poetry install
poetry build
- name: understand env
run: |
ls dist
- uses: actions/upload-artifact@v3
with:
path: |
./dist/*
publish:
runs-on: ubuntu-latest
needs: [build_wheels]
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
ref: main

- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- name: Check dist
run: ls -R dist

- name: Publish package distributions to GitHub Releases
id: github-release
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

# jobs:
# create_release:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.9", "3.10"]

# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# # - name: Create wheel
# # run: |
# # python -m pip install --upgrade pip poetry
# # poetry install
# # poetry build
# # ls
# - name: check python verision
# run: |
# python -V -V
# - name: Python Semantic Release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: understand env
# run: |
# ls dist
# - name: Run gh CLI Command
# if: steps.release.outputs.released == 'true'
# env:
# GH_TOKEN: ${{ github.token }}
# run: |
# gh release create test-actual-files ./dist/*
3 changes: 2 additions & 1 deletion .github/workflows/env_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ jobs:
env:
NAS_CREDS: ${{ secrets.NAS_CREDS_JSON }}
run: |
poetry run python -m pytest pyha_tests -rP
poetry run python -m pytest pyha_tests -rP
Loading

0 comments on commit 59e89ef

Please sign in to comment.