Skip to content

Commit

Permalink
feat: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamMartens committed Jul 7, 2021
1 parent cd33ece commit 72e80e7
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build Figma Plugin

on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: 'https://npm.pkg.github.com'
- run: yarn install
env:
NODE_AUTH_TOKEN: ${{ secrets.READ_PACKAGES_PAT }}
- run: yarn build
env:
API_KEY: ${{ secrets.API_KEY }}
- uses: papeloto/action-zip@v1
with:
files: dist/ manifest.json
dest: plugin.zip
- uses: actions/upload-artifact@v2
with:
name: plugin
path: |
plugin.zip
- name: get-npm-version
id: package_version
uses: martinbeentjes/npm-get-version-action@master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release_${{ steps.package_version.outputs.current-version}}
release_name: Release ${{ steps.package_version.outputs.current-version}}
- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./plugin.zip
asset_name: plugin.zip
asset_content_type: application/zip

0 comments on commit 72e80e7

Please sign in to comment.