Update LICENSE (#28) #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: PyPI-Release | |
on: | |
push: | |
branches: | |
- main | |
env: | |
USER_EMAIL: '[email protected]' | |
USER_NAME: 'CDEvents Bot' | |
USER_ID: 'cdevents-bot' | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_BOT_TOKEN }} | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.9" | |
- name: Set Release Version | |
run: echo "RELEASE=$(grep 'version' pyproject.toml | cut -d \" -f2)" >> $GITHUB_ENV | |
- name: Set up npm | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '12' | |
- run: git config --global user.email "${{ env.USER_EMAIL }}" | |
- run: git config --global user.name "${{ env.USER_NAME }}" | |
- name: Install github-changes | |
run: | | |
npm install -g github-changes | |
- name: Generate Changelog | |
run: | | |
github-changes -o ${GITHUB_REPOSITORY///*} -r ${GITHUB_REPOSITORY##*/} -a --only-pulls --use-commit-body -k ${{ secrets.GITHUB_TOKEN }} -b main -n "${{ env.RELEASE }}" -m "(YYYY-MM-DD)" -t "Changelog" -f "CHANGELOG.md" | |
git add CHANGELOG.md | |
git commit -m "Updated CHANGELOG.md" | |
- name: Push changes to release branch | |
run: | | |
git push origin main | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "${{ env.RELEASE }}" | |
release_name: "Release ${{ env.RELEASE }}" | |
body_path: "CHANGELOG.md" | |
draft: false | |
prerelease: false |