-
Notifications
You must be signed in to change notification settings - Fork 60
52 lines (45 loc) · 1.41 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
name: Release LifeOS
on:
push:
tags:
- '*'
env:
NAME: LifeOS
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Build
id: build
run: |
mkdir ${{ env.NAME }}
cp -r -- .obsidian \-1.\ Capture 0.\ PeriodicNotes 1.\ Projects 2.\ Areas 3.\ Resources 4.\ Archives 5.\ Express HOME.canvas README.md TASK.md ${{ env.NAME }}
zip -r ${{ env.NAME }}.zip ${{ env.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: Upload zip file
id: upload-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.NAME }}.zip
asset_name: ${{ env.NAME }}.zip
asset_content_type: application/zip