generated from UK-Export-Finance/nestjs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.31 KB
/
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
# Git Hub Actions
#####################################
# This GHA is responsible for creating automated
# GitHub release based PR. Once the PR is merged
# Google release please will update the `CHANGELOG.md`
# `README.md` and `package.json` files.
# Followed by tagging the commit with the appropriate version
# number (as per SemVer) and create a GitHub release on the tag.
name: Automated release
run-name: Executing release on ${{ github.repository }} 🚀
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
steps:
- name: Environment 🧪
run: echo "Environment set to ${{ env.environment }}"
- name: Timezone 🌐
run: echo "Timezone set to ${{ env.timezone }}"
# 2. Update files
release:
name: Release ✨
needs: setup
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: ubuntu-latest
steps:
- name: Repository
uses: actions/checkout@v4
- name: Create
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node