-
Notifications
You must be signed in to change notification settings - Fork 36
45 lines (42 loc) · 1.36 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
name: Manual Publish Package
on:
workflow_dispatch:
inputs:
prerelease:
description: 'Is this a prerelease.' # use this to control publish tag, for instance NPM wouldn't set latest.
type: boolean
required: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
jobs:
manual-build-publish:
runs-on: ubuntu-22.04
# Needed to get tokens during publishing.
permissions:
id-token: write
contents: read
steps:
- uses: erlef/setup-beam@v1
with:
version-type: loose
otp-version: 25.x
rebar3-version: 3.18.0
- uses: actions/checkout@v3
- id: build-and-test
# Build using the same steps from CI.
name: Build and Test
uses: ./.github/actions/ci
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
name: 'Get the hex publishing token'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/hex/api_key = HEX_AUTH_TOKEN'
- id: publish
name: Publish Package
uses: ./.github/actions/publish
with:
token: ${{ env.HEX_AUTH_TOKEN }}
prerelease: ${{ inputs.prerelease }}
dry_run: ${{ inputs.dry_run }}