Skip to content

Commit

Permalink
Add bundle-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
masked-rpgmaker committed Sep 11, 2020
1 parent 1e87a71 commit 88eab00
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/bundle-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Bundle
on:
release:
types: ['created']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.0
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Build
run: |
npm ci
npm run build
- name: Get plugin name
id: plugin_name
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'name'
- name: Upload Release Bundle
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./dist/js/plugins/${{ steps.plugin_name.outputs.prop }}.js
asset_name: ${{ steps.plugin_name.outputs.prop }}.js
asset_content_type: application/javascript

0 comments on commit 88eab00

Please sign in to comment.