-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (62 loc) · 1.98 KB
/
manual-publish.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
name: Publish Package
on:
workflow_dispatch:
inputs:
package:
type: choice
description: 'What to publish?'
options:
- '["server","redis"]'
- '["server"]'
- '["redis"]'
dry_run:
description: "Dry run? If checked, don't publish."
type: boolean
required: false
default: true
skip_pack:
description: "Don't include source rock? If checked, only publish rockspec."
required: false
type: boolean
default: false
force:
description: "Overwrite existing version?"
type: boolean
required: false
default: false
jobs:
rockspec-info:
uses: ./.github/workflows/rockspec-info.yml
build-publish:
needs: rockspec-info
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package: ${{ fromJSON(inputs.package) }}
# Needed for AWS SSM access to get the LuaRocks token.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: launchdarkly/gh-actions/actions/[email protected]
name: 'Get LuaRocks token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/luarocks/token = LUAROCKS_API_TOKEN'
- name: Get package name
id: pkg-info
run: |
rockspec=$(echo '${{ needs.rockspec-info.outputs.info }}' | jq -r '.${{ matrix.package }}.rockspec')
echo "package=$rockspec" >> $GITHUB_OUTPUT
- uses: ./.github/actions/ci
with:
rockspec: ${{ steps.pkg-info.outputs.package }}
- uses: ./.github/actions/publish
name: ${{ format('Publish {0}', steps.pkg-info.outputs.package) }}
with:
dry_run: ${{ inputs.dry_run }}
rockspec: ${{ steps.pkg-info.outputs.package }}
skip_pack: ${{ inputs.skip_pack }}
force: ${{ inputs.force }}