mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-01 14:38:47 +00:00
ci: Update workflows
This commit is contained in:
2 files changed
+29
-35
No files matched your search
@@ -1,4 +1,4 @@
|
||||
name: Create Release
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,36 +6,22 @@ on:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
run: npm ci
|
||||
|
||||
- name: Format
|
||||
run: npm run lint:format
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Package
|
||||
run: npm run package
|
||||
test:
|
||||
uses: ./.github/workflows/test.yml
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
|
||||
concurrency: github-release
|
||||
|
||||
environment:
|
||||
name: release
|
||||
url: https://github.com/ardalanamini/auto-changelog/releases
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs:
|
||||
- build
|
||||
- test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -43,8 +29,6 @@ jobs:
|
||||
- name: Changelog
|
||||
id: changelog
|
||||
uses: ardalanamini/auto-changelog@master
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
|
||||
@@ -5,9 +5,12 @@ on: # rebuild any PRs and main branch changes
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build: # make sure build/ci work properly
|
||||
name: Build
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -17,21 +20,28 @@ jobs:
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ matrix.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
key: ${{ matrix.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Install packages
|
||||
run: npm i
|
||||
- name: Use Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Lint
|
||||
- name: Install dependencies
|
||||
run: npm i --no-fund
|
||||
|
||||
- name: Check code styles
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
- name: Build using TypeScript
|
||||
run: npm run build
|
||||
|
||||
- name: Package
|
||||
- name: Package using ncc
|
||||
run: npm run package
|
||||
|
||||
test: # make sure the action works on a clean machine without building
|
||||
name: Test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -39,10 +49,10 @@ jobs:
|
||||
|
||||
- name: Changelog
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
test-with-exclude: # make sure the action works on a clean machine without building
|
||||
test-with-inputes: # make sure the action works on a clean machine without building
|
||||
name: Test with inputs
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
Reference in new issue
Block a user