Skip to content

Commit

Permalink
update github action scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Aug 20, 2024
1 parent f946c52 commit 65e711f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Deploy python package
name: Deploy python package to PyPI

on:
push:
tags: ['*']

jobs:
deploy:
runs-on: ubuntu-20.04
if: github.repository == 'issp-center-dev/PHYSBO'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/physbo
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -19,9 +23,10 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools build twine
python -m pip install -U pip
python -m pip install build
- name: Publish
run: |
python -m build -s
python -m twine upload -u __token__ -p "${{ secrets.PYPI_DEPLOY_TOKEN }}" dist/*
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
8 changes: 6 additions & 2 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python package
name: Test python package

on: [push]
on:
push:
pull_request:
schedule:
- cron: '0 0 1,15 * *' # JST 9:00 AM, 1st and 15th of every month

jobs:
build:
Expand Down

0 comments on commit 65e711f

Please sign in to comment.