-
Notifications
You must be signed in to change notification settings - Fork 33
72 lines (61 loc) · 1.85 KB
/
create_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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]'
git remote --verbose
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