Skip to content

Commit

Permalink
Suppre fichier LICENSE redondant, ajout ZIP sur GH Action commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Aug 19, 2024
1 parent efb9087 commit af6fe15
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 351 deletions.
60 changes: 48 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,67 @@ on:
push:
tags:
- '*'
branches:
- master
pull_request:
branches:
- master
paths:
- 'cadastre/**'

jobs:
zipping:
package-commit:
name: Package commit
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
with:
# To fetch tags
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: "pip"
cache-dependency-path: "requirements/packaging.txt"

- name: Install Python requirements
run: pip install -r requirements/packaging.txt

- name: Set env
run: |
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "VERSION=$(echo ${TAG} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')-alpha" >> $GITHUB_ENV
- name: Package
run: >-
qgis-plugin-ci
package ${{ env.VERSION }}
- name: Unzip
run: unzip dynamic_layers.${{ env.VERSION }}.zip -d tmp

- uses: actions/upload-artifact@v4
with:
name: dynamic_layers.${{ env.VERSION }}
path: tmp

package-release:
runs-on: ubuntu-latest
if: github.repository_owner == '3liz' && contains(github.ref, 'refs/tags/')
steps:

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- uses: actions/[email protected]
with:
Expand Down Expand Up @@ -49,15 +94,6 @@ jobs:
--osgeo-password ${{ secrets.OSGEO_PASSWORD }}
--create-plugin-repo
- name: Tweet
uses: mugi111/[email protected]
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: "Nouvelle version de l'extension Cadastre ${{ env.RELEASE_VERSION }} 🇫🇷 pour #QGIS https://github.com/3liz/QgisCadastrePlugin/releases"

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
Expand Down
Loading

0 comments on commit af6fe15

Please sign in to comment.