Skip to content

Commit

Permalink
build: auto create prebuild assets
Browse files Browse the repository at this point in the history
  • Loading branch information
ccloli committed Aug 31, 2023
1 parent 98b83e6 commit 5028ab5
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/prebuild-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Prebuild and Release

on:
push:
branches:
- master
paths-ignore:
- README.md

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'

- run: yarn install
- run: yarn build:deps
- run: yarn build:sandpack

- name: Pack
run: |
tar cJf ./codesandbox.tar.xz -C www .
tar czf ./codesandbox.tar.gz -C www .
- name: Generate release tag
id: generate_release_tag
uses: alexvingg/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: 'prebuild-assets-'

- name: Create Release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
artifacts: 'codesandbox.tar.xz,codesandbox.tar.gz'
tag: ${{ steps.generate_release_tag.outputs.release_tag }}
commit: 'master'

0 comments on commit 5028ab5

Please sign in to comment.