Skip to content

📦 Create a WBS Release #22

📦 Create a WBS Release

📦 Create a WBS Release #22

name: 📦 Create a WBS Release
on:
workflow_dispatch:
inputs:
image_name:
description: 'Image to release'
type: choice
required: true
default: 'wikibase'
options:
- deploy
- elasticsearch
- quickstatements
- wdqs
- wdqs-frontend
- wdqs-proxy
- wikibase
- All projects (images and deploy) with unreleased changes
dry_run:
description: "Dry run, don't do it yet."
type: boolean
required: true
default: true
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
token: ${{ secrets.GH_WBS_BOT_TOKEN }}
- uses: ./.github/actions/setup-environment
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
# implicitly docker hub
username: wmdetravisbot
password: ${{ secrets.WBS_PUBLISH_TOKEN }}
- name: Create release
run: |
set -e # abort on error
set -x # show commands
git config --global user.name 'wikibase suite github actions bot'
git config --global user.email '[email protected]'
if [ "${{ inputs.dry_run }}" == "true" ]; then
DRY_RUN_FLAG="--dry-run"
else
DRY_RUN_FLAG=""
fi
if [ "${{ inputs.image_name }}" == "All projects (images and deploy) with unreleased changes" ]; then
PROJECT_ARG=""
else
PROJECT_ARG="-p ${{ inputs.image_name }}"
fi
./nx release $PROJECT_ARG $DRY_RUN_FLAG --skip-publish --verbose
# Temporary workaround for nx issue: https://github.com/nrwl/nx/issues/22073#
if [ $? -eq 0 ] && [ -z "$DRY_RUN_FLAG" ]; then
git push origin --tags
fi