Skip to content

Commit

Permalink
ci: add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leoli0605 committed Mar 12, 2024
1 parent 72026e7 commit cd2c149
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 3 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: build

on:
push:
branches:
- 'releases/*'
workflow_dispatch:

jobs:
build:
runs-on: macos-14
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: |
npm install -g pnpm
pnpm install
- name: Build
run: pnpm build
- run: ls ./dist

- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist

release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: dist
path: ./dist
- run: ls ./dist

- uses: TriPSs/conventional-changelog-action@v5
id: changelog
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-count: 0
skip-git-pull: 'true'

- uses: ncipollo/release-action@v1
if: steps.changelog.outputs.skipped != 'true'
with:
allowUpdates: true
artifacts: 'dist/env-setup-*'
body: ${{ steps.changelog.outputs.clean_changelog }}
draft: false
generateReleaseNotes: true
name: ${{ steps.changelog.outputs.tag }}
prerelease: false
tag: ${{ steps.changelog.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: test

on:
push:
branches: [main]
branches:
- main
- 'releases/*'
pull_request:
branches: [main]
branches:
- main
workflow_dispatch:

jobs:
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 0.1.0 (2024-03-12)


### Bug Fixes

* repair PowerShell commands and command execution errors ([8d464f2](https://github.com/leoli0605/npm-env-setup/commit/8d464f21ad95ca76f477ed895cfb8735f01d3616))
* repair the command error that occurs when running on Windows ([a6812f9](https://github.com/leoli0605/npm-env-setup/commit/a6812f9827b1927eb78b036fa7b072768bb853f6))


### Features

* add console log for MacOS detection and update Ubuntu version check ([b901d7b](https://github.com/leoli0605/npm-env-setup/commit/b901d7b461e8806d5481af4ad0de99c1a7f9735b))
* add packages file and related functions ([45a0bf7](https://github.com/leoli0605/npm-env-setup/commit/45a0bf78f82824d25f1b0373b21b509d147ffe83))
* add WSL & Sandbox enable powershell script ([d627d3e](https://github.com/leoli0605/npm-env-setup/commit/d627d3ee1d63775abedad56b0ac5cef601c4a73b))
* completed the setup of the Windows environment ([e74366e](https://github.com/leoli0605/npm-env-setup/commit/e74366e7fd665b507a9213f3a97e6c00e978c496))
* enable script execution and add error handling ([52471e8](https://github.com/leoli0605/npm-env-setup/commit/52471e880c114abaf14b609604ec889ec69eb70c))
* update Node.js installation command for Windows ([cc36638](https://github.com/leoli0605/npm-env-setup/commit/cc366381d0169f682ebf070cea610e8abb4e4bd3))



2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@leoli0605/env-setup",
"version": "0.1.0",
"version": "0.0.0",
"description": "\"\"",
"main": "./src/index.mjs",
"files": [
Expand Down

0 comments on commit cd2c149

Please sign in to comment.