Skip to content

Merge branch 'master' into stable #18

Merge branch 'master' into stable

Merge branch 'master' into stable #18

Workflow file for this run

name: Tag
on:
push:
branches:
- stable
paths:
- '**.py'
- '!tests/**'
jobs:
Tag:
# needs: [Conda-Build]
runs-on: ubuntu-latest
outputs: # Create variable usable from another job
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
## CREATE TAG/RELEASE
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: stable
tag_prefix:
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
## UPDATE CHANGELOG
- uses: actions/checkout@v3
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Generate CHANGELOG
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gem install github_changelog_generator
AUTH=$(echo $GITHUB_REPOSITORY | sed -e 's/\// /g' | awk '{print "--user " $1 " --project " $2}')
echo $AUTH
github_changelog_generator $AUTH --no-unreleased
- name: Update _version.py
env:
TAG: ${{ steps.tag_version.outputs.new_tag }}
run: |
folder=`dirname $(find . -name _version.py)`
echo "__version__ = \"$TAG\"" > $folder/_version.py
- name: Commit files
run: |
git config --local user.email "$GITHUB_EMAIL"
git config --local user.name "$GITHUB_USERNAME"
git commit -m "doc(CHANGELOG): update" -a
env:
GITHUB_USERNAME: breakthewall
GITHUB_EMAIL: [email protected]
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Update master branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master