Plugin update: apply-flatfield (#443) #3
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: Package Release | |
on: | |
push: | |
branches: | |
- master | |
- main | |
- dev | |
permissions: | |
contents: write | |
jobs: | |
package-filter: | |
name: Filter for updated package | |
uses: ./.github/workflows/package-filter.yml | |
package-release: | |
name: Bump release version of updated package | |
runs-on: ubuntu-latest | |
needs: package-filter | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install bump2version | |
run: | | |
python -m pip install --upgrade pip | |
pip install bump2version | |
- name: Get Old Version | |
id: old_version | |
run: | | |
cd "${{ needs.package-filter.outputs.package_dir }}" | |
if [[ "$(cat VERSION)" != *"dev"* ]] | |
then | |
echo "::error::${{ needs.package-filter.outputs.package_name }} does not have a dev version" && exit 1 | |
fi | |
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
- name: Bump Version | |
id: bump_version | |
run: | | |
cd "${{ needs.package-filter.outputs.package_dir }}" | |
bump2version release --no-commit | |
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
- name: Commit and push all changed files | |
env: | |
CI_COMMIT_MESSAGE: Bumped version for "${{ needs.package-filter.outputs.package_name }}" from ${{ steps.old_version.outputs.version }} to ${{ steps.bump_version.outputs.version }} | |
CI_COMMIT_AUTHOR: Continuous Integration | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "username@users.noreply.github.com" | |
git commit -a -m "build: ${{ env.CI_COMMIT_MESSAGE }}" | |
git push |