forked from echinopscis/obsidian-wikidata-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.93 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
name: Release Obsidian plugin
on:
push:
tags:
- '*'
env:
PLUGIN_NAME: phylotree-block-plugin
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn install --frozen-lockfile
- name: Build
id: build
run: |
yarn build
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
ls
echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# VERSION: ${{ github.ref }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
# draft: false
# prerelease: false
- name: Update release with built artifacts (./${{ env.PLUGIN_NAME }}.zip)
uses: softprops/action-gh-release@v1
with:
files: ./${{ env.PLUGIN_NAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update release with built artifacts (main.js)
uses: softprops/action-gh-release@v1
with:
files: ./main.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update release with built artifacts (manifest.json)
uses: softprops/action-gh-release@v1
with:
files: ./manifest.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update release with built artifacts (styles.css)
uses: softprops/action-gh-release@v1
with:
files: ./styles.css
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}