forked from tc39/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# prevent all files from being included in release archives | ||
* export-ignore | ||
meetings export-ignore | ||
scripts export-ignore |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- meetings/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: files | ||
name: get changed files | ||
uses: jitterbit/get-changed-files@v1 | ||
with: | ||
format: 'json' | ||
- run: | | ||
readarray -t added_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added }}')" | ||
for added_file in "${added_files[@]}"; do | ||
if [[ ${added_file} == meetings/* ]] | ||
then | ||
tag=$(echo "${added_file}" | grep -oP '(?<=meetings/)[^\./]+') | ||
echo "tag=${tag}" >> "$GITHUB_ENV" # set GH env var so other action can access it | ||
echo tag set to "${tag}" | ||
break | ||
fi | ||
done | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: release | ||
run: | | ||
git fetch --depth=1 --tags | ||
if [[ $(git tag -l "${{env.tag}}") ]] | ||
then | ||
echo "release exists; skipping" | ||
else | ||
gh release create "${{env.tag}}" | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |