Skip to content

Commit b73e318

Browse files
committed
[GHA] Refactor release workflow
1 parent a49d97c commit b73e318

File tree

1 file changed

+27
-61
lines changed

1 file changed

+27
-61
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,88 +10,54 @@ on:
1010
default: false
1111

1212
jobs:
13-
tests:
14-
uses: ./.github/workflows/tests.yml
13+
check:
14+
- run: echo "XXXXXXXXXXXXX ${{ inputs.dry_run }}"
1515

1616
release-dry-run:
1717
runs-on: ubuntu-latest
18-
if: ${{ github.repository_owner == '3liz' && inputs.dry_run == 'true'}}
18+
if: ${{ github.repository_owner == '3liz' && inputs.dry_run == true}}
1919
steps:
2020
- uses: actions/checkout@v6
2121

22-
- name: Setup Python
23-
uses: actions/setup-python@v6
24-
with:
25-
python-version: "3.12"
26-
architecture: x64
27-
cache: "pip"
28-
cache-dependency-path: "requirements/packaging.txt"
29-
30-
- name: Set env
31-
run: echo "RELEASE_VERSION=`qgis-plugin-ci meta -r version`" >> $GITHUB_ENV
32-
33-
- name: Install QGIS Plugin CI
34-
run: pip install --quiet -r requirements/packaging.txt
22+
- name: Fetch yapt
23+
run: curl $YAPT_REPOSITORY_URL | tar -xzf -
3524

3625
- name: Fetch current changelog
3726
run: |
38-
qgis-plugin-ci changelog ${{ env.RELEASE_VERSION }} >> release.md
27+
./yapt-pkg changelog ${{ env.RELEASE_VERSION }} >> release.md
3928
cat release.md
4029
4130
- name: Package and deploy the zip
4231
run: >
43-
qgis-plugin-ci -vv
44-
release "${{ env.RELEASE_VERSION }}"
45-
--github-token "${{ secrets.BOT_HUB_TOKEN }}"
32+
./yapt-pkg -vv --publish --dry-run
4633
--osgeo-username "${{ secrets.OSGEO_USERNAME }}"
4734
--osgeo-password "${{ secrets.OSGEO_PASSWORD }}"
48-
--dry-run
4935
5036
release:
51-
needs: [tests]
52-
5337
runs-on: ubuntu-latest
54-
if: ${{ github.repository_owner == '3liz' && contains(github.ref, 'refs/tags/') && inputs.dry-run == 'false' }}
38+
if: ${{ github.repository_owner == '3liz' && contains(github.ref, 'refs/tags/') && inputs.dry_run == false }}
5539

5640
steps:
5741
- uses: actions/checkout@v6
58-
59-
- name: Setup Python
60-
uses: actions/setup-python@v6
61-
with:
62-
python-version: "3.12"
63-
architecture: x64
64-
cache: "pip"
65-
cache-dependency-path: "requirements/packaging.txt"
66-
67-
- name: Set env
68-
run: echo "RELEASE_VERSION=`qgis-plugin-ci meta -r version`" >> $GITHUB_ENV
69-
70-
- name: Install QGIS Plugin CI
71-
run: pip install --quiet -r requirements/packaging.txt
72-
42+
43+
- name: Fetch yapt
44+
run: curl $YAPT_REPOSITORY_URL | tar -czf -
45+
7346
- name: Fetch current changelog
74-
run: qgis-plugin-ci changelog ${{ env.RELEASE_VERSION }} >> release.md
47+
run: |
48+
./yapt-pkg changelog ${{ env.RELEASE_VERSION }} >> release.md
49+
cat release.md
7550
76-
- name: Create release on GitHub
77-
uses: ncipollo/release-action@v1.20.0
78-
with:
79-
bodyFile: release.md
80-
token: ${{ secrets.BOT_HUB_TOKEN }}
51+
#- name: Package and publish
52+
# run: >
53+
# ./yapt-pkg -vv --publish
54+
# --osgeo-username "${{ secrets.OSGEO_USERNAME }}"
55+
# --osgeo-password "${{ secrets.OSGEO_PASSWORD }}"
56+
57+
# - name: Create release on GitHub
58+
# uses: ncipollo/release-action@v1.20
59+
# with:
60+
# bodyFile: release.md
61+
# artifacts: "*.zip"
62+
# token: ${{ secrets.BOT_HUB_TOKEN }}
8163

82-
- name: Package and deploy the zip
83-
run: >
84-
qgis-plugin-ci
85-
release ${{ env.RELEASE_VERSION }}
86-
--github-token "${{ secrets.BOT_HUB_TOKEN }}"
87-
--osgeo-username "${{ secrets.OSGEO_USERNAME }}"
88-
--osgeo-password "${{ secrets.OSGEO_PASSWORD }}"
89-
--create-plugin-repo
90-
91-
- name: Repository Dispatch
92-
uses: peter-evans/repository-dispatch@v3
93-
with:
94-
token: ${{ secrets.BOT_HUB_TOKEN }}
95-
repository: 3liz/3liz.github.io
96-
event-type: merge-plugins
97-
client-payload: '{"name": "lizmap_server", "version": "${{ env.RELEASE_VERSION }}", "url": "https://github.com/3liz/qgis-lizmap-server-plugin/releases/latest/download/plugins.xml"}'

0 commit comments

Comments
 (0)