Merge pull request #143 from planetlabs/release-2.3.3 #8
Workflow file for this run
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: | |
tags: "*" | |
jobs: | |
release: | |
name: "Release on tag" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Get source code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install plugin dependencies | |
run: pip install -r requirements.txt | |
- name: Setup | |
run: | | |
pip install paver | |
paver setup | |
- name: Build package | |
env: | |
SENTRY_KEY: ${{ secrets.SENTRY_KEY }} | |
SEGMENTS_KEY: ${{ secrets.SEGMENTS_KEY }} | |
GITHUB_REF: ${{ github.ref }} | |
run: | | |
paver package.sentry=${SENTRY_KEY} package.segments=$SEGMENTS_KEY package.version=${GITHUB_REF##*/} package | |
- name: Create/update release on GitHub | |
uses: ncipollo/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
omitNameDuringUpdate: true | |
artifacts: "planet_explorer.zip" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: release | |
- name: Update custom plugin repository to include latest release | |
run: | | |
paver -v generate_plugin_repo_xml | |
echo -e "\n" >> docs/repository/plugins.xml | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global --add safe.directory /__w/qgis-planet-plugin/qgis-planet-plugin | |
git add -A | |
git commit -m "Update plugins.xml" | |
git push --force origin release |