Skip to content

Commit

Permalink
Update workflow to also support VisualEditor (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKostka authored Nov 12, 2024
1 parent eee2d37 commit 5593da1
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5593da1

Please sign in to comment.