Skip to content

build: add gh workflow for building releases #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish

on:
tags:
- 'v*.*.*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v2
-
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
-
name: Test
run: bundle exec rake
-
name: Checkout xs3p
uses: actions/checkout@v2
with:
repository: macintoshpie/xs3p
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! should we move this to the buildingsync org? Not really concerned to be honest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a good idea, I'll create a repo

path: xs3p
-
name: Build HTML
run: |
sudo apt install xsltproc
xsltproc --output index.html xs3p/xs3p.xsl BuildingSync.xsd
stat index.html
-
name: Build Data Dictionary
run: bundle exec rake generate_data_dictionary
-
name: Build Changelog
run: |
# grab the most recent version section from the changelog
python -c 'print(open("CHANGELOG.md").read().split("## ")[1])' > ${{ github.workflow }}-CHANGELOG.md
cat ${{ github.workflow }}-CHANGELOG.md
-
name: Release with Artifacts
uses: softprops/action-gh-release@v1
with:
files: |
BuildingSync.xsd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me!

index.html
docs/DataDictionary.xlsx
docs/enumerations.json
body_path: ${{ github.workflow }}-CHANGELOG.md
prerelease: ${{ contains(github.ref, 'pr') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading