-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade SLDR build and deploy workflows (#33)
* Emit artifact.id with repository dispatch event Record and include the built artifact id with the repository_dispatch event sent to langtags. * Update to node20 compatible actions * Add a cache to skip flattening and deployment of the sldr if it's not changed. * Restrict deployment to pushes or merges into master and release. For feature and fix branches we want to build, but not deploy until the are merged into their respective master and release branches. * Trigger staging builds, but not deploy, for any branch starting with `feat/` or `fix/`
- Loading branch information
Showing
5 changed files
with
74 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,45 @@ | ||
name: Build | ||
on: | ||
workflow_call: | ||
outputs: | ||
artifact-id: | ||
description: "The artifact id uploaded by this build" | ||
value: ${{ jobs.build.outputs.artifact-id }} | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
artifact-id: ${{ steps.upload.outputs.artifact-id }} | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- run: pip install 'git+https://github.com/silnrsi/sldrtools' | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use cached sldr | ||
id: cache-sldr | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
flat | ||
unflat | ||
key: sldr-flattened-${{ hashFiles('sldr/**') }} | ||
|
||
- name: Generate unflattened sldr | ||
if: steps.cache-sldr.outputs.cache-hit != 'true' | ||
run: ldmlflatten -o unflat -i sldr -a -c -g | ||
|
||
- name: Generate flattened sldr | ||
if: steps.cache-sldr.outputs.cache-hit != 'true' | ||
run: ldmlflatten -o flat -i sldr -a -A -g | ||
|
||
- uses: actions/upload-artifact@v4 | ||
id: upload | ||
if: steps.cache-sldr.outputs.cache-hit != 'true' | ||
with: | ||
name: sldr | ||
path: | | ||
flat/ | ||
unflat/ | ||
compression-level: 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
.*.sw? | ||
# runtime litter | ||
*.pyc | ||
*~ | ||
**/__pycache__/ | ||
node_modules/ | ||
vendor_bower/ | ||
dev/ | ||
flat/ | ||
unflat/ | ||
cldrdata/ | ||
cldrflat/ | ||
temp/ | ||
results/ | ||
keyboards/ | ||
doc/*.rnc | ||
sldr/*/*.orig | ||
|
||
# Editors | ||
*.bak | ||
# build intermediates | ||
*.egg-info/** | ||
dist/ | ||
build/ | ||
/flat/** | ||
/unflat/** | ||
|
||
# dev environment | ||
/.venv/ | ||
/.vscode/ | ||
*.code-workspace | ||
*.env | ||
*.secrets | ||
*~ | ||
*.bak |