forked from utPLSQL/utPLSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (88 loc) · 3.47 KB
/
release.yml
File metadata and controls
106 lines (88 loc) · 3.47 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Create and publish release artifacts
on:
release:
types: [ released ]
#See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-multiple-events-with-activity-types-or-configuration
defaults:
run:
shell: bash
jobs:
publish:
name: Deploy documentation
concurrency: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: c-py/action-dotenv-to-setenv@v2
with:
env-file: .github/variables/.env
- uses: FranzDiebold/github-env-vars-action@v2 #https://github.com/marketplace/actions/github-environment-variables-action
- name: Set buid version number env variables
run: .github/scripts/set_version_numbers_env.sh
- name: Setup git config
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Update project version & build number in source code and documentation
run: .github/scripts/update_project_version.sh
- name: Copy and push documentation to utPLSQL-github-io repo
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
run: .github/scripts/push_docs_to_github_io.sh
upload_artifacts:
name: Upload archives
concurrency: upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: c-py/action-dotenv-to-setenv@v2
with:
env-file: .github/variables/.env
- uses: FranzDiebold/github-env-vars-action@v2 #https://github.com/marketplace/actions/github-environment-variables-action
- name: Set buid version number env variables
run: .github/scripts/set_version_numbers_env.sh
- name: Update project version & build number in source code and documentation
run: .github/scripts/update_project_version.sh
- name: Setup git config
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Build html documentation
run: |
pip install mkdocs
mkdocs build --clean --strict
rm -rf docs/*
cp -r -v site/* docs
git add .
git commit -m "tmp commit of HTML documentation for building a release archive"
- name: Build release archives
run: |
git archive --prefix=utPLSQL/ -o utPLSQL.zip --format=zip HEAD
git archive --prefix=utPLSQL/ -o utPLSQL.tar.gz --format=tar.gz HEAD
md5sum utPLSQL.zip --tag > utPLSQL.zip.md5
md5sum utPLSQL.tar.gz --tag > utPLSQL.tar.gz.md5
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
utPLSQL.zip
utPLSQL.zip.md5
utPLSQL.tar.gz
utPLSQL.tar.gz.md5
slack-workflow-status:
if: always()
name: Post Workflow Status To Slack
needs: [ publish, upload_artifacts ]
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
name: 'Github Actions[bot]'
icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png'