-
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (63 loc) · 2.06 KB
/
release-notes.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
name: Release New Tags
on:
workflow_dispatch:
push:
tags:
- 'v*' # Any pushed tag
jobs:
build:
name: Create Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest]
node-version: [18]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm run build
- uses: pCYSl5EDgo/cat@master
id: loadChangelog
with:
path: CHANGELOG-current.md
- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.ATEOAT_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.loadChangelog.outputs.text }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.createRelease.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for Publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
- name: Build Blog Post for Version Update
run: npm run util:blogpost:generate
- name: Read blog_post.txt file
id: getBlogPost
run: echo "filename=$(cat blog-post.txt)" >> $GITHUB_OUTPUT
- name: Publish Version Update Blog Post
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.PUSH_TO_REPO_TOKEN }}
with:
source_file: '${{ steps.getBlogPost.outputs.filename }}'
destination_repo: 'After-the-End-of-All-Things/blog'
destination_folder: '_posts'
user_email: '[email protected]'
user_name: 'seiyria'
commit_message: 'Add version notes'
destination_branch: master