Skip to content

Commit

Permalink
* added reload_input to pbook
Browse files Browse the repository at this point in the history
  * added memory warning and -y to pathena/prun
  • Loading branch information
tmaeno committed Nov 2, 2023
1 parent bd797f7 commit 0f69ec1
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/condapublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This is a basic workflow to help you get started with Actions

name: Publish on Conda-forge

# Controls when the workflow will run
on:

release:
types: [ published ]

workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
publish:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# variables
env:
REPO_NAME: ${{ github.event.repository.name }}
OWNER_NAME: ${{ github.repository_owner }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Check-out src repository
- uses: actions/checkout@v3
with:
path: src

# Check-out feedstock
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_GITHUB }}
repository: ${{ github.repository_owner }}/${{ github.event.repository.name }}-feedstock
path: dst

# Re-sync
- name: Re-sync
run: |
cd dst
git remote add upstream https://github.com/conda-forge/${REPO_NAME}-feedstock.git
git fetch upstream
git checkout main
git merge upstream/main
# Generate meta.yaml
- name: Generate and push meta.yaml
run: |
PACKAGE_NAME=`echo $REPO_NAME | sed -e 's/-//g'`
cd src/${PACKAGE_NAME}
VERSION=`python -c 'exec(open("PandaToolsPkgInfo.py").read());print (release_version)'`
cd -
echo REPO_NAME=$REPO_NAME
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
echo PACKAGE_NAME=$PACKAGE_NAME
echo VERSION=$VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
wget https://github.com/${OWNER_NAME}/${REPO_NAME}/archive/refs/tags/${VERSION}.tar.gz -q -O dummy.tar.gz
SHA256SUM=`sha256sum dummy.tar.gz`
SHA256SUM=${SHA256SUM% *}
echo SHA256SUM=$SHA256SUM
sed -e "s/___PACKAGE_VERSION___/${VERSION}/g" src/templates/conda_meta.yaml.template \
| sed -e "s/___SHA256SUM___/${SHA256SUM}/g" > dst/recipe/meta.yaml
- name: Push the change
run: |
cd dst
# use personal info since github-actions/[email protected] doesn't work for forked repos
git config --global user.name 'Tadashi Maeno'
git config --global user.email '[email protected]'
git diff --quiet && git diff --staged --quiet || git commit -am "${VERSION} github action"
git push
- name: Request pull request
env:
# use PAT instead of GITHUB_TOKEN since the latter cannot submit a PR
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
run: |
cd dst
gh pr create -t "${REPO_NAME} ${VERSION} github action" -b "automatic pull request"
40 changes: 40 additions & 0 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install hatch twine build
python -m pip list
- name: Build a sdist
run: |
python -m build -s
cp packages/light/pyproject.toml .
hatch build -t wheel
- name: Verify the distribution
run: twine check dist/*

- name: Publish distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'published' && github.repository == 'PanDAWMS/panda-client'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 0f69ec1

Please sign in to comment.