-
-
Notifications
You must be signed in to change notification settings - Fork 21
128 lines (115 loc) · 3.72 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: "release"
on:
release:
types:
- published
- edited
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: read
id-token: write
attestations: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: build
uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
push: never
runCmd: |
npm ci
npm run build
- name: generate artifact attestation for action.yml
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018
with:
subject-path: action.yml
- name: generate artifact attestation for lib/index.js
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018
with:
subject-path: lib/index.js
- name: Build and Tag
# temporary use own fork until
# uses: JasonEtco/build-and-tag-action@v2
uses: sarisia/build-and-tag-action@86c2f7fbe7691ec3529884d45038295c0aa3ce35
env:
GITHUB_TOKEN: ${{ github.token }}
with:
commit_message: |
Automatic build
Commit ${{ github.sha }}
Run ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Update source tag
shell: bash
run: |
TAGNAME=${{ github.ref_name }}-src
git tag $TAGNAME ${{ github.sha }}
git push origin $TAGNAME
- name: report result
uses: sarisia/actions-status-discord@33dfe58bd6a779c49926a82a2c008bab1ca733ee
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
e2e-all-os:
needs: release
strategy:
max-parallel: 2 # to avoid discord webhook's rate limit
matrix:
os:
- ubuntu-latest
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
- windows-latest
- windows-2022
- windows-2019
- macos-latest
- macos-15
- macos-14
- macos-13
- macos-12
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.ref_name }}
- uses: ./
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: Success
content: "hey <@316911818725392384>"
title: "e2e - ${{ github.ref_name }} - ${{ matrix.os }}"
description: |
Tag: `${{ github.ref_name }}`
Build atrifact SHA: `${{ github.sha }}`
nofail: false
nodetail: false
image: "https://user-images.githubusercontent.com/33576079/81886735-69e03f80-95d8-11ea-8828-fa10dda8afd1.png"
color: 0xFFFFFF
username: GitHub Actions
avatar_url: ${{ secrets.AVATAR_URL }}
conclude:
runs-on: ubuntu-latest
needs: e2e-all-os
if: always()
permissions:
actions: read
steps:
- uses: sarisia/actions/conclusion@main
id: ghapi
- uses: sarisia/actions-status-discord@33dfe58bd6a779c49926a82a2c008bab1ca733ee
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ steps.ghapi.outputs.conclusion }}
title: ${{ github.workflow }} - conclusion