Skip to content

Commit ceefd14

Browse files
authored
Merge pull request #203 from poingstudios/201-prepare-ios-spm
feat: Make documentation deployment workflow callable and trigger it from manual releases, extracting the version from `plugin.cfg`.
2 parents c5a43c4 + 868399e commit ceefd14

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/docs.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ on:
55
- master
66
tags:
77
- '*'
8+
workflow_call:
9+
810
permissions:
911
contents: write
12+
1013
jobs:
1114
deploy:
1215
runs-on: ubuntu-latest
@@ -28,13 +31,11 @@ jobs:
2831
git config user.email "github-actions[bot]@users.noreply.github.com"
2932
- name: Deploy documentation
3033
run: |
31-
if [[ $GITHUB_REF == refs/tags/* ]]; then
32-
VERSION=${GITHUB_REF#refs/tags/}
33-
VERSION=${VERSION#v}
34-
VERSION=$(echo $VERSION | cut -d. -f1,2)
34+
if [[ $GITHUB_REF == refs/tags/* ]] || [[ $GITHUB_EVENT_NAME == "workflow_call" ]]; then
35+
VERSION=$(grep "version=" addons/admob/plugin.cfg | cut -d'"' -f2 | sed 's/^v//' | cut -d. -f1,2)
3536
3637
mike deploy --push --update-aliases $VERSION stable
3738
mike set-default --push stable
3839
else
3940
mike deploy --push --update-aliases latest
40-
fi
41+
fi

.github/workflows/manual_release_version.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ jobs:
3333
uses: softprops/action-gh-release@v2
3434
with:
3535
tag_name: ${{env.PLUGIN_VERSION}}
36-
name: ${{env.PLUGIN_VERSION}}
37-
body: "Manual release for version ${{env.PLUGIN_VERSION}}"
3836
draft: false
3937
prerelease: false
4038
generate_release_notes: true
@@ -56,4 +54,8 @@ jobs:
5654
VERSION: ${{env.PLUGIN_VERSION}}
5755
COMMIT_HASH: ${{ github.sha }}
5856
run: |
59-
python3 static/workflow_files/push.py
57+
python3 static/workflow_files/push.py
58+
59+
deploy-docs:
60+
needs: release-version
61+
uses: ./.github/workflows/docs.yml

0 commit comments

Comments
 (0)