Skip to content

Commit

Permalink
Customize run-name; try sparse-checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
lianghai committed Dec 4, 2024
1 parent 97e269c commit 273655e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-ucd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rm -r dist/UCD/ucd/Unihan
mv dist/UCD/ucd/version-ReadMe.txt dist/UCD/ReadMe.txt
mv dist/UCD/ucd/zipped-ReadMe.txt dist/zipped/ReadMe.txt

if [ $MODE = "alpha" ]; then
if [ $MODE = "Alpha" ]; then
mkdir dist/emoji
cp unicodetools/data/emoji/dev/* dist/emoji

Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/publish-ucd.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# See https://github.com/unicode-org/unicodetools/blob/main/docs/data-workflow.md#publication

# Test locally with https://github.com/nektos/act:
# act --workflows .github/workflows/publish-ucd.yml --input mode=snapshot
# act --workflows .github/workflows/publish-ucd.yml --input mode=Alpha

name: Publish UCD

run-name: "${{ github.workflow }}: ${{ inputs.mode }}"

on:
workflow_dispatch:
inputs:
mode:
description: Publication mode
type: choice
options:
- snapshot
- alpha
default: snapshot
- Snapshot
- Alpha
default: Snapshot

env:
COPY_YEAR: "2024"
Expand All @@ -27,6 +29,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github/workflows
unicodetools/data/ucd/dev
unicodetools/data/emoji/dev
unicodetools/data/idna/dev
unicodetools/data/idna/idna2008derived
- run: .github/workflows/publish-ucd.sh
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 273655e

Please sign in to comment.