-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 1.92 KB
/
deploy.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
name: TDR Deploy Generated Graphql
on:
workflow_dispatch:
inputs:
ts-only:
default: false
description: Whether to deploy to npm only
required: false
type: boolean
env:
RUN_NUMBER: ${{ github.run_id }}${{ github.run_attempt }}
BRANCH_NAME: version-bump-${{ github.run_id }}${{ github.run_attempt }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
git_user_signingkey: true
git_commit_gpgsign: true
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- run: ./.github/scripts/setup.sh
- run: |
./.github/scripts/deploy_npm.sh ${{ secrets.NPM_TOKEN }}
id: deploy-npm
- if: ${{ github.event.inputs.ts-only == 'false' }}
id: build
run: |
sbt 'release with-defaults'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Create Pull Request
run: gh pr create --fill --label 'Version bump'
env:
GITHUB_TOKEN: ${{ secrets.WORKFLOW_PAT }}
- if: ${{ github.event.inputs.ts-only == 'false' }}
name: Send success message
uses: nationalarchives/tdr-github-actions/.github/actions/slack-send@main
with:
message: ":white_check_mark: Generated graphql ${{ steps.build.outputs.latest-tag }} has been published"
slack-url: ${{ secrets.SLACK_WEBHOOK }}
- name: Send success message
uses: nationalarchives/tdr-github-actions/.github/actions/slack-send@main
with:
message: ":white_check_mark: Generated graphql ${{ steps.deploy-npm.outputs.set-npm-version }} has been published to npm"
slack-url: ${{ secrets.SLACK_WEBHOOK }}