Skip to content

🚀 Release

🚀 Release #30

Workflow file for this run

name: 🚀 Release
on:
push:
tags:
- "*"
jobs:
release:
name: "🚀 Release"
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Set env
# CI_COMMIT_TAG is used in Makefile to not have the "RC" flag
run: echo "CI_COMMIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get source code
uses: actions/checkout@v3
- name: Changelog
id: changelog
uses: 3liz/changelog-release@0.2.0
- name: Set up Python 3.10
uses: actions/setup-python@v2.3.1
with:
python-version: '3.10'
- name: Check tag
run: tests/check_tag.sh ${{ env.CI_COMMIT_TAG }}
- name: Setup
run: |
make manifest
- name: Install Python requirements
run: pip install qgis-plugin-ci
- name : Get current changelog
run: qgis-plugin-ci changelog ${{ env.CI_COMMIT_TAG }} >> release.md
- name: Build package
run: |
python setup.py sdist
- name: Create release on GitHub
uses: ncipollo/release-action@v1.11.1
with:
body: ${{ steps.changelog.outputs.markdown }}
token: ${{ secrets.BOT_HUB_TOKEN }}
allowUpdates: true
artifacts: "dist/*.tar.gz"
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Tweet
uses: mugi111/tweet-trigger-release@v1.2
with:
consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
tweet_body: "New version of Py-QGIS-Server ${{ env.CI_COMMIT_TAG }} 🐍 for #QGIS https://github.com/3liz/py-qgis-server/releases"