11name : Create and publish release artifacts
2- env :
3- PULL_REQUEST_NAME : ${{github.head_ref}}
4- PULL_REQUEST_BRANCH : ${{github.head_ref}}
5- REPO_SLUG : ${{github.repository}}
6- PR_SLUG : ${{github.repository}}
7-
82on :
93 release :
10- types : [ created ]
4+ types : [ released ]
115# See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-multiple-events-with-activity-types-or-configuration
126
137defaults :
@@ -17,6 +11,7 @@ defaults:
1711jobs :
1812
1913 publish :
14+ name : Deploy documentation
2015 concurrency : publish
2116 runs-on : ubuntu-latest
2217
3732 git config --global user.email "github-actions[bot]@users.noreply.github.com"
3833 git config --global user.name "github-actions[bot]"
3934
40- - name : Install MkDocs
41- run : pip install mkdocs
42-
4335 - name : Update project version & build number in source code and documentation
4436 run : .travis/update_project_version.sh
4537
@@ -48,11 +40,52 @@ jobs:
4840 API_TOKEN_GITHUB : ${{ secrets.API_TOKEN_GITHUB }}
4941 run : .travis/push_docs_to_github_io.sh
5042
43+ upload_artifacts :
44+ name : Upload archives
45+ concurrency : upload
46+ runs-on : ubuntu-latest
47+
48+ steps :
49+ - uses : actions/checkout@v2
50+ with :
51+ fetch-depth : 0
52+ - name : Update project version & build number in source code and documentation
53+ run : .travis/update_project_version.sh
54+
55+ - name : Setup git config
56+ run : |
57+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
58+ git config --global user.name "github-actions[bot]"
59+
60+ - name : Build html documentation
61+ run : |
62+ pip install mkdocs
63+ mkdocs build --clean --strict
64+ rm -rf docs/*
65+ cp -r -v site/* docs
66+ git add .
67+ git commit -m "tmp commit of HTML documentation for building a release archive"
68+
69+ - name : Build release archives
70+ run : |
71+ git archive --prefix=utPLSQL/ -o utPLSQL.zip --format=zip HEAD
72+ git archive --prefix=utPLSQL/ -o utPLSQL.tar.gz --format=tar.gz HEAD
73+ md5sum utPLSQL.zip --tag > utPLSQL.zip.md5
74+ md5sum utPLSQL.tar.gz --tag > utPLSQL.tar.gz.md5
75+
76+ - name : Release
77+ uses : softprops/action-gh-release@v1
78+ with :
79+ files : |
80+ utPLSQL.zip
81+ utPLSQL.zip.md5
82+ utPLSQL.tar.gz
83+ utPLSQL.tar.gz.md5
5184
5285 slack-workflow-status :
5386 if : always()
5487 name : Post Workflow Status To Slack
55- needs : [publish]
88+ needs : [ publish, upload_artifacts ]
5689 runs-on : ubuntu-latest
5790 steps :
5891 - name : Slack Workflow Notification
6598 name : ' Github Actions[bot]'
6699 icon_url : ' https://octodex.github.com/images/mona-the-rivetertocat.png'
67100
68- # TODO - add building of release archive
69- # TODO - add publishing of release
0 commit comments