-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (49 loc) · 1.85 KB
/
CreateRelease.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
name: Create Release
on:
push:
branches:
- main
paths:
- 'package.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.8.0'
- name: Install Dependencies
run: npm install
- name: Build the Project
run: npm run build
- name: Get the version
id: get_version
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset ZIP
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/bionic-reading-epub-converter-webapp_v${{ env.VERSION }}.zip
asset_name: Bionic_Reading_Epub_Converter_WebApp_v${{ env.VERSION }}.zip
asset_content_type: application/zip
- name: Commit changes to docs
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add docs
git commit -m "Update docs for version ${{ env.VERSION }}"
git push