Skip to content

Commit

Permalink
ci/cd: build & release
Browse files Browse the repository at this point in the history
  • Loading branch information
PleahMaCaka committed Feb 20, 2023
1 parent 61ffbf6 commit b732189
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build and release
name: build

on:
push:
Expand Down Expand Up @@ -48,9 +48,4 @@ jobs:
run: pnpm install

- name: Build
run: pnpm run webpack

- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
run: pnpm run webpack
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Releases

on:
push:
tags:
- '*'

jobs:
build:

permissions: write-all

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: "https://registry.npmjs.org"

- uses: pnpm/action-setup@v2.2.4
name: Install pnpm

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run webpack

- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"

0 comments on commit b732189

Please sign in to comment.