generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (41 loc) · 1.34 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: 'test'
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: |
npm install
npm run all
- uses: ./
id: calver
with:
api_token: ${{secrets.GITHUB_TOKEN}}
dry_run: true
- run: |
echo "version: ${{ steps.calver.outputs.version }}"
echo "title: ${{ steps.calver.outputs.title }}"
[[ "${{ steps.calver.outputs.title }}" == "Release ver. ${{ steps.calver.outputs.version }}" ]] && exit 0 || exit 1
- uses: ./
id: calver_with_parameters
with:
api_token: ${{secrets.GITHUB_TOKEN}}
dry_run: true
generate_release_notes: false
timezone: Asia/Shanghai
target_commitish: ${{ github.sha }}
release_title: '${version}'
- run: echo ${{ steps.calver_with_parameters.outputs.version }}
- run: |
echo "version: ${{ steps.calver_with_parameters.outputs.version }}"
echo "title: ${{ steps.calver_with_parameters.outputs.title }}"
[[ "${{ steps.calver_with_parameters.outputs.version }}" == "${{ steps.calver_with_parameters.outputs.title }}" ]] && exit 0 || exit 1