-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (101 loc) · 2.97 KB
/
Copy pathrelease.yaml
File metadata and controls
107 lines (101 loc) · 2.97 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
jobs:
gate:
runs-on: ubuntu-latest
outputs:
is_publish: ${{ steps.flag.outputs.needs-publish }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: flag
run: node scripts/needs-publish.js >> $GITHUB_OUTPUT
integration-tests:
needs: gate
if: needs.gate.outputs.is_publish == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- "@stackattack/astro-static-site"
- "@stackattack/vite-static-site-example"
- "@stackattack/ecs-api-example"
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.3.1
with:
role-to-assume: arn:aws:iam::081142152120:role/stackattack-docs-github-role-1543232
aws-region: us-east-2
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile --filter ${{ matrix.package }}...
- run: pnpm --filter ${{ matrix.package }}... build
- name: Set up Docker Buildx
if: matrix.package == '@stackattack/ecs-api-example'
uses: docker/setup-buildx-action@v3
- run: pnpm --filter ${{ matrix.package }} test
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
publish:
needs: [gate, integration-tests]
if: needs.gate.outputs.is_publish == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm -r build
- name: Copy root README to aws
run: cp README.md packages/aws/README.md
- name: Publish Packages
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}