-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.03 KB
/
main-workflow.yaml
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
name: Main workflow
on:
push:
branches:
- main
paths:
- "src/*"
- "**.json"
jobs:
get_version:
name: Retrieve version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.package_version.outputs.version }}
steps:
- uses: zendesk/checkout@v4
- name: Get Package version
id: package_version
run: |
echo "Reading package.json"
PACKAGE_VERSION=$(cat ./package.json | jq '.version' | tr -d '"')
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
create-release:
name: Create release
runs-on: ubuntu-latest
needs:
- get_version
env:
VERSION: ${{ needs.get_version.outputs.version }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Create release
run: |
gh release create ${{ env.VERSION }} -R '${{ github.repository }}' --generate-notes