Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danpacho/github-action-test

Github action ๐Ÿฆพ์„ ์‚ฌ์šฉํ•ด ์ž๋™ํ™” ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ด…์‹œ๋‹ค!
https://github.com/danpacho/github-action-test

github-actions npm-ci

Last synced: 2 days ago
JSON representation

Github action ๐Ÿฆพ์„ ์‚ฌ์šฉํ•ด ์ž๋™ํ™” ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ด…์‹œ๋‹ค!

Awesome Lists containing this project

README

        

# Github `action`์„ ํ•™์Šตํ•ด๋ด…๋‹ˆ๋‹ค.

## ํ˜„์žฌ ๊ธฐ์ˆ  Stack?

1. `pnpm` ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €
2. **branch merge**๋กœ ํŒจํ‚ค์ง€๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ์ƒํ™ฉ

## Workflows?

1. `codeql.yml`

- `"javascript"` ์ฝ”๋“œ ํ€„๋ฆฌํ‹ฐ ๊ด€๋ฆฌ
- `main` branch์— **pull request ๋˜๋Š” ์ˆœ๊ฐ„** ์‹คํ–‰

2. `release.yml`

- `main` branch์— commit๋˜๋Š” ์ˆœ๊ฐ„ ์‹คํ–‰
- pull request๊ฐ€ merge ๋˜๋Š” ์ˆœ๊ฐ„ ์‹คํ–‰ (์ด๋Š” autolabeler๋ฅผ ์ž‘๋™์‹œํ‚ค๊ธฐ ์œ„ํ•จ)
- release ๋ณ€๊ฒฝ ๋‚ด์—ญ, branch์˜ title๊ณผ tag๋ฅผ ๊ธฐ์ค€์œผ๋กœ ์ž๋™ ์ž‘์„ฑ

3. `publish.yml`

- github **release๋˜๋Š” ์ˆœ๊ฐ„** `ci` script ์‹คํ–‰
- `ci` ์‹คํ–‰ ์ดํ›„ npm์— ๋ฐฐํฌ

4. `size-limit.yml`

- pull request์— ์˜ํ•ด `main` branch์— merge๋˜๋Š” ์ˆœ๊ฐ„ ์‹คํ–‰
- ํŒจํ‚ค์ง€์˜ gzip bundle size๋ฅผ ๋ณด๊ณ  ํ›„ ์ œํ•œ๋Ÿ‰ ๋น„๊ต ๋ฐ ์‚ฌ์ด์ฆˆ ๋ณ€๊ฒฝ์  ์ฒดํฌ

## Workflows Helpers Packages

1. [`pnpm/action-setup@v2`](https://github.com/pnpm/action-setup)

- `pnpm`์„ ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋กœ ์‚ฌ์šฉ

2. [`actions/cache@v3`](https://github.com/actions/cache)

- `node_modules` ์บ์‹ฑ ์ „๋žต ์‚ฌ์šฉ
- unique key๋ฅผ hashํ•œ ํ›„ ์กฐํšŒ
- ์ด๊ฒƒ์„ ์•ˆํ•˜๋ฉด? **์‹œ๊ฐ„-๋น„์šฉ ์†ํ•ด**

3. [`JS-DevTools/npm-publish@v1`](https://github.com/JS-DevTools/npm-publish)

- `npm publish` ์ž๋™ํ™”

- `NPM_TOKEN`์„ ์ด์šฉํ•ด `npm` ์ž๋™ํ™”
```yml
uses: JS-DevTools/npm-publish@v1
name: Publish package
with:
token: ${{ secrets.NPM_TOKEN }}
```

4. [`release-drafter/release-drafter@v5`](https://github.com/release-drafter/release-drafter)

- release ๋‚ด์—ญ ์—…๋ฐ์ดํŠธ ์ž๋™ํ™”

5. [`andresz1/size-limit-action@v1`](https://github.com/andresz1/size-limit-action)

- ํŒจํ‚ค์ง€ bundle size๋ฅผ ์ฒดํฌ ๋ฐ ๊ฒ€ํ† 

## Action ์ž‘๋™ ์ˆœ์„œ

1. branch๋ฅผ ํŒŒ์„œ ์ฝ”๋“œ ์ž‘์—…
2. branch pull request ์š”์ฒญ
- `codeql.yml` ์ฝ”๋“œํ€„๋ฆฌํ‹ฐ action run
- `release.yml` release action run
- `size-limit.yml` size limit action run
3. branch merge
- `release.yml` release action run
4. release draft: release action์œผ๋กœ ์ƒ์„ฑ๋œ release template๋กœ version release
- `publish.yml` npm publish action run