Merge pull request #865 from I2PC/agm_fakeAction-1 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [ fakeMaster ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Set up MPI | |
uses: mpi4py/setup-mpi@master | |
- name: Set up Python | |
uses: actions/setup-python@main | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
pip install -r requirements.txt | |
# - name: Build and publish | |
# env: | |
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
# run: | | |
# python setup.py sdist bdist_wheel | |
# twine upload dist/* -c "${{ secrets.PYPI_COMMENT }}" | |
- name: Get changelog, tag name, & release name | |
id: variables | |
run: | | |
awk '/## Release/{if (p) exit; p=1} p' CHANGELOG.md > latest_changelog_with_title.md | |
cat latest_changelog_with_title.md | tail -n +2 > latest_changelog.md | |
RELEASE_NAME=$(cat latest_changelog_with_title.md | head -n 1 | sed 's/## Release //' | sed 's/^ *//') | |
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT | |
echo "TAG_NAME=${RELEASE_NAME// /}" >> $GITHUB_OUTPUT | |
- name: Generate tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: ${{ steps.variables.outputs.TAG_NAME }} | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@main | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: ${{ steps.variables.outputs.RELEASE_NAME }} | |
bodyFile: latest_changelog.md |