Skip to content

Update weekly_tag.yaml #395

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 1 commit into from
Jan 14, 2025
Merged
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
30 changes: 14 additions & 16 deletions .github/workflows/weekly_tag.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# Apply a tag to HEAD at the beginning of each week.
# We can use this to create semver-looking tags for releases like
# 2020.44.123+abc1234
# See https://blog.aspect.build/versioning-releases-from-a-monorepo
on:
schedule:
# Mondays at 5am UTC / midnight EST
- cron: '0 5 * * 1'

schedule:
# Mondays at 5am UTC / midnight EST
- cron: '0 5 * * 1'
jobs:
tagger:
runs-on: ubuntu-latest
steps:
- name: tag HEAD with [year].[week number]
run: |
curl --request POST \
--url https://api.github.com/repos/{{ "${{ github.repository }}" }}/git/refs \
--header 'authorization: Bearer {{ "${{ secrets.GITHUB_TOKEN }}" }}' \
--data @- << EOF
{
"ref": "refs/tags/$(date +%Y.%V)",
"sha": "{{ "${{ github.sha }}" }}"
}
EOF
- name: tag HEAD with date +%Y.%V
run: |
curl --request POST \
--url https://api.github.com/repos/${{ github.repository }}/git/refs \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--data @- << EOF
{
"ref": "refs/tags/$(date +%Y.%V)",
"sha": "${{ github.sha }}"
}
EOF