-
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.7 KB
/
release.yml
File metadata and controls
57 lines (47 loc) · 1.7 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Version and Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
version:
if: github.repository == 'ashuvssut/github-issue-alert'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Force Git to use HTTPS instead of SSH
run: |
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"
- run: yarn install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: yarn changeset tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push Git Tags
if: steps.changesets.outputs.hasChangesets == 'false' # If hasChangesets == 'false', then changesets is in Publish mode
run: git push --follow-tags
- name: Get latest Git tag
if: steps.changesets.outputs.hasChangesets == 'false'
id: get_tag
run: |
tag=$(git describe --tags --abbrev=0 || echo "No tags found")
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Trigger Electron Build
if: steps.changesets.outputs.hasChangesets == 'false' && steps.get_tag.outputs.tag != 'No tags found'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: trigger-electron-build
client-payload: |
{
"tag": "${{ steps.get_tag.outputs.tag }}"
}