Skip to content

Commit

Permalink
[[PRERELEASE]] poetry の採用
Browse files Browse the repository at this point in the history
  • Loading branch information
HiroyaNakakawaji committed Apr 12, 2023
1 parent ec288ce commit 3c410f2
Show file tree
Hide file tree
Showing 11 changed files with 835 additions and 1,580 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install poetry
pip install wheel
- name: Build
run: |
pipenv run clean
pipenv run build
pipenv run deploy
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
poetry build
poetry publish
9 changes: 5 additions & 4 deletions .github/workflows/release-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install poetry
pip install wheel
- name: Build
run: |
pipenv run clean
pipenv run build
pipenv run test-deploy
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi "${{ secrets.TEST_PYPI_TOKEN }}"
poetry build
poetry publish -r test-pypi
12 changes: 6 additions & 6 deletions .github/workflows/versioning-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.EXT_GITHUB_PAT }}
- name: Setup Node
uses: actions/setup-node@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
node-version: '16'
python-version: '3.x'
- name: Set releaser settings
run: |
git config --global user.name ${{ secrets.EXT_GITHUB_USER }}
Expand All @@ -44,6 +44,6 @@ jobs:
- name: Release
if: "env.UPDATE_ARGS != ''"
run: |
npm i -g release-it@${RELEASE_IT_VERSION}
npm i -g @release-it/bumper@${BUMPER_VERSION}
release-it -- ${UPDATE_ARGS} --ci
RELEASE_VERSION=$(poetry version -s ${{ env.UPDATE_ARGS }}
git tag ${RELESE_VERSION}
git push origin ${RELESE_VERSION}
22 changes: 10 additions & 12 deletions .github/workflows/versioning-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.EXT_GITHUB_PAT }}
- name: Resolve branch name
run: 'echo BRANCH_NAME="${{ github.ref_name }}" >> $GITHUB_ENV'
- name: Resolve branch hash
run: 'echo BRANCH_NAME_HASH="$(echo $BRANCH_NAME | sha256sum)" >> $GITHUB_ENV'
- name: Resolve rc name
run: echo RC_NAME=${BRANCH_NAME_HASH:1:8} >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
node-version: '16'
python-version: '3.x'
- name: Install poetry
run: pip install poetry
- name: Resolve version num
run: echo PRERELESE_VERSION = $(poetry version --dry-run -s prerelease | sed 's/a/rc/g') >> $GITHUB_ENV
- name: Set releaser settings
run: |
git config --global user.name ${{ secrets.EXT_GITHUB_USER }}
git config --global user.email ${{ secrets.EXT_GITHUB_EMAIL }}
- name: Release
if: "contains(toJSON(github.event.commits.*.message), '[[PRERELEASE]]') && !contains(toJSON(github.event.commits.*.message), '[automate_versioning_prerelease] Prerelease ')"
run: |
npm i -g release-it@${RELEASE_IT_VERSION}
npm i -g @release-it/bumper@${BUMPER_VERSION}
release-it -c .release-it-prerelease.json --preRelease=rc${{env.RC_NAME}} --ci
poetry version ${{ env.PRERELESE_VERSION }}
git tag ${{ env.PRERELESE_VERSION }}
git push origin ${{ env.PRERELESE_VERSION }}
41 changes: 0 additions & 41 deletions Pipfile

This file was deleted.

0 comments on commit 3c410f2

Please sign in to comment.