-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (72 loc) · 2.1 KB
/
site-release.yaml
File metadata and controls
74 lines (72 loc) · 2.1 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Create release and build website
# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'locations/**'
- 'site/**'
- '.github/workflows/site-release.yaml'
permissions:
contents: write
packages: read
pull-requests: read
jobs:
get-version:
runs-on: ubuntu-24.04
outputs:
skipped: ${{ steps.changelog.outputs.skipped }}
version: ${{ steps.changelog.outputs.tag }}
steps:
# Get the repository's code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
skip-commit: "true"
skip-git-pull: "true"
skip-tag: "true"
build:
needs: get-version
if: ${{ needs.get-version.outputs.skipped == 'false' }}
uses: ./.github/workflows/site.yaml
with:
version: ${{ needs.get-version.outputs.version }}
secrets:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
create-version:
needs: build
runs-on: ubuntu-24.04
steps:
# Get the repository's code
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.github_token }}
skip-commit: "true"
skip-git-pull: "true"
skip-tag: "false"
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}