-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
74 lines (68 loc) · 1.97 KB
/
alpha-releases.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
name: Alpha Releases
on:
schedule:
- cron: '0 20 * * 3' # weekly (Wednesday)
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Basic Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: build
run: pnpm vite build --mode=development
- name: test
run: pnpm test
release:
permissions:
contents: write # to push tag
name: Tag + Release
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: setup git
run: |
git config --local user.email '[email protected]'
git config --local user.name 'Ember.js Alpha Releaser'
- name: Find next alpha
run: |
LATEST_ALPHA=`npm view ember-source dist-tags.alpha`
export NEXT_ALPHA=`node bin/next-alpha-version.js ${LATEST_ALPHA}`
echo "NEXT_ALPHA=$NEXT_ALPHA" >> $GITHUB_ENV
- name: tag the next alpha
run: npm version ${{env.NEXT_ALPHA}} --allow-same-version
- name: build for publish
env:
BUILD_TYPE: alpha
OVERRIDE_FEATURES: ''
run: node bin/build-for-publishing.js
- name: publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: push tag
# Push in a way that will NOT trigger other workflows
run: git push origin v${{env.NEXT_ALPHA}}
notify:
name: Notify Discord
runs-on: ubuntu-latest
needs:
[
test,
release,
]
if: failure()
steps:
- uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.FRAMEWORK_WEBHOOK }}
status: 'Failure'
title: 'Ember.js Alpha Release'
color: 0xcc0000
url: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
username: GitHub Actions