Skip to content

Commit 9337e85

Browse files
committed
ci: add publish script
1 parent 7a51c37 commit 9337e85

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/publish.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
uses: actions/checkout@v2
14+
-
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: 2.7.2
18+
bundler-cache: true
19+
-
20+
name: Test
21+
run: bundle exec rake
22+
-
23+
name: Checkout xs3p
24+
uses: actions/checkout@v2
25+
with:
26+
repository: macintoshpie/xs3p
27+
path: xs3p
28+
-
29+
name: Build HTML
30+
run: |
31+
sudo apt install xsltproc
32+
xsltproc --output index.html xs3p/xs3p.xsl BuildingSync.xsd
33+
stat index.html
34+
-
35+
name: Build Data Dictionary
36+
run: bundle exec rake generate_data_dictionary
37+
-
38+
name: Build Changelog
39+
run: |
40+
# grab the most recent version section from the changelog
41+
python -c 'print(open("CHANGELOG.md").read().split("## ")[1])' > ${{ github.workflow }}-CHANGELOG.md
42+
cat ${{ github.workflow }}-CHANGELOG.md
43+
-
44+
name: Release with Artifacts
45+
uses: softprops/action-gh-release@v1
46+
with:
47+
files: |
48+
BuildingSync.xsd
49+
index.html
50+
docs/DataDictionary.xlsx
51+
docs/enumerations.json
52+
docs/geometry_reference.pdf
53+
body_path: ${{ github.workflow }}-CHANGELOG.md
54+
prerelease: ${{ contains(github.ref, 'pr') }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)