-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.41 KB
/
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
name: On-Release
on:
workflow_dispatch:
inputs:
environment:
description: 'Deploy environment'
default: test
type: environment
required: true
push:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
cancel-in-progress: false
permissions:
id-token: write
contents: read
run-name: 🚀 ${{ github.actor }} is releasing ${{ inputs.environment }}
jobs:
artifact-version:
runs-on: ubuntu-latest
outputs:
package: ${{ steps.package.artifact-version }}
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 📦 Retrieve Artifact-version from package
id: package
run: |
ARTIFACT_VERSION=$(jq -r '.version' package.json)
echo "📝 Retrieved version: $ARTIFACT_VERSION" >> $GITHUB_STEP_SUMMARY
echo "artifact-version=${ARTIFACT_VERSION}-" >> $GITHUB_OUTPUT
build:
if: ${{ github.event_name == 'push' }}
uses: ./.github/workflows/rwf_build.yml
with:
artifact-name: gh-actions-playground
artifact-version: ${{ needs.artifact-version.outputs.package }}
environment: ${{ inputs.environment }}
secrets: inherit
deploy:
uses: ./.github/workflows/rwf_deploy.yml
with:
environment: ${{ inputs.environment }}
artifact-version: ${{ needs.artifact-version.outputs.package }}
secrets: inherit