mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-03 22:15:31 +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:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,36 +6,22 @@ on:
|
|||||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
name: Build
|
uses: ./.github/workflows/test.yml
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
|
|
||||||
|
concurrency: github-release
|
||||||
|
|
||||||
|
environment:
|
||||||
|
name: release
|
||||||
|
url: https://github.com/ardalanamini/auto-changelog/releases
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
needs:
|
needs:
|
||||||
- build
|
- test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -43,8 +29,6 @@ jobs:
|
|||||||
- name: Changelog
|
- name: Changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
uses: ardalanamini/auto-changelog@master
|
uses: ardalanamini/auto-changelog@master
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ on: # rebuild any PRs and main branch changes
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build: # make sure build/ci work properly
|
build: # make sure build/ci work properly
|
||||||
|
name: Build
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -17,21 +20,28 @@ jobs:
|
|||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
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
|
- name: Use Node.js 16
|
||||||
run: npm i
|
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
|
run: npm run lint
|
||||||
|
|
||||||
- name: Build
|
- name: Build using TypeScript
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Package
|
- name: Package using ncc
|
||||||
run: npm run package
|
run: npm run package
|
||||||
|
|
||||||
test: # make sure the action works on a clean machine without building
|
test: # make sure the action works on a clean machine without building
|
||||||
|
name: Test
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -39,10 +49,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Changelog
|
- name: Changelog
|
||||||
uses: ./
|
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
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in new issue
Block a user