Skip to content

Commit

Permalink
Add github workflow to publish release
Browse files Browse the repository at this point in the history
  • Loading branch information
1nfiniteloop committed Dec 30, 2021
1 parent f0f4cc3 commit 6107804
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build release

on:
push:
tags:
- 'v*'
branches:
- main

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: '0' # all branches and tags

# ref: https://github.com/actions/cache
- name: Get cache for third party dependencies
id: cache
uses: actions/cache@v2
with:
path: third_party
key: third-party-${{ hashFiles('tools/install_third_party') }}

- name: Build third-party dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: tools/install_third_party

- name: Build package
run: tools/package

# ref: https://github.com/actions/upload-artifact
- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: json-bookmarks.zip
path: out/json-bookmarks-*.zip

# ref: https://github.com/softprops/action-gh-release
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: out/json-bookmarks-*.zip
File renamed without changes.

0 comments on commit 6107804

Please sign in to comment.