-
Notifications
You must be signed in to change notification settings - Fork 235
71 lines (60 loc) · 2.49 KB
/
release.yml
File metadata and controls
71 lines (60 loc) · 2.49 KB
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
name: Create npm and GitHub Release
on:
pull_request:
types:
- closed
workflow_dispatch:
permissions:
contents: write
id-token: write # For publishing to npm using --provenance
pages: write # For publishing documentation
### TODO: Replace instances of './.github/workflows/' w/ `auth0/dx-sdk-actions/workflows/` and append `@latest` after the common `dx-sdk-actions` repo is made public.
### TODO: Also remove `get-prerelease`, `get-release-notes`, `get-version`, `npm-publish`, `release-create`, and `tag-exists` actions from this repo's .github/actions folder once the repo is public.
### TODO: Also remove `npm-release` workflow from this repo's .github/workflows folder once the repo is public.
jobs:
rl-scanner:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Build package
run: yarn build
- name: Create tgz build artifact
run: |
tar -czvf react-native-auth0.tgz *
- name: Get version
id: get_version
run: |
version=$(head -1 .version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Run RL Scanner
uses: auth0/devsecops-tooling/.github/actions/rl-scan@main
with:
artifact-name: 'react-native-auth0'
artifact-path: '${{ github.workspace }}/react-native-auth0.tgz'
version: ${{ steps.get_version.outputs.version }}
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
SIGNAL_HANDLER_DOMAIN: ${{ secrets.SIGNAL_HANDLER_DOMAIN }}
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
PRODSEC_PYTHON_TOOLS_REPO: ${{ secrets.PRODSEC_PYTHON_TOOLS_REPO }}
release:
uses: ./.github/workflows/npm-release.yml
needs: rl-scanner
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-docs:
needs: release
if: success()
uses: ./.github/workflows/publish-docs.yml
permissions:
contents: write
pages: write
id-token: write