Skip to content

Commit

Permalink
Merge pull request #10 from imamkhaira/develop
Browse files Browse the repository at this point in the history
chore: 👷 update github build
  • Loading branch information
imamkhaira authored Jul 25, 2022
2 parents 3687662 + fc1e2ef commit 3ff576c
Show file tree
Hide file tree
Showing 7 changed files with 293 additions and 445 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches:
- master
- develop

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand Down
45 changes: 27 additions & 18 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,41 @@ name: CI
on:
workflow_dispatch:
push:
tags:
- v*-release
branches:
- master

jobs:
build:
name: 'Create build'
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- run: |
npm install
npm run build
release:
needs: build
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: ncipollo/[email protected]
- name: Checkout main
id: checkout
uses: actions/checkout@v2

- name: Test tsc Build
id: build
run: |
npm install
npm run build
- name: Get build date
id: get_date
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M%S')"

- name: Get version from package.json
id: get_version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'

- name: Create GitHub Release
id: make_release
uses: ncipollo/[email protected]
with:
tag: v${{steps.get_version.outputs.prop}}-${{steps.get_date.outputs.date}}
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 0 additions & 28 deletions .project

This file was deleted.

16 changes: 0 additions & 16 deletions build.ts

This file was deleted.

Loading

0 comments on commit 3ff576c

Please sign in to comment.