From 5593da1a0a384f094003365ed99485f9634abd30 Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Tue, 12 Nov 2024 11:05:59 +0100 Subject: [PATCH] Update workflow to also support VisualEditor (#2) --- .github/workflows/packager.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/packager.yml b/.github/workflows/packager.yml index 019a44d..ff5cf95 100644 --- a/.github/workflows/packager.yml +++ b/.github/workflows/packager.yml @@ -3,8 +3,15 @@ name: Packager on: workflow_dispatch: inputs: + name: + description: Extension name + type: choice + required: true + options: + - wikibase + - visualeditor ref: - description: Wikibase ref + description: Branch ref default: REL1_39 type: string required: true @@ -17,21 +24,21 @@ jobs: run: echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV - name: Set archive name - run: echo "ARCHIVE_NAME=wikibase-${{ env.TIMESTAMP }}-${{ inputs.ref }}.tar.gz" >> $GITHUB_ENV + run: echo "ARCHIVE_NAME=${{ github.event.inputs.name }}-${{ env.TIMESTAMP }}-${{ inputs.ref }}.tar.gz" >> $GITHUB_ENV - - name: Check out Wikibase + - name: Check out extension uses: actions/checkout@v3 with: submodules: true - repository: wikimedia/mediawiki-extensions-Wikibase - path: ./repos/Wikibase + repository: wikimedia/mediawiki-extensions-${{ github.event.inputs.name }} + path: ./repos/extension ref: ${{ inputs.ref }} # Fetching submodules may fail if "fetch-depth" is too shallow fetch-depth: 3 - name: Remove .git related files run: rm -rf .git .gitignore .gitmodules - working-directory: ./repos/Wikibase + working-directory: ./repos/extension - name: Check out this repository uses: actions/checkout@v3 @@ -42,7 +49,7 @@ jobs: - name: Create a Wikibase archive file run: tar -czvf ./../release/${{ env.ARCHIVE_NAME }} ./ - working-directory: ./repos/Wikibase + working-directory: ./repos/extension - name: Commit and push archive uses: EndBug/add-and-commit@v9