123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: release
- on:
- repository_dispatch:
- types: [release]
- schedule:
- # We want the release to be at 9-10am Pacific Time
- # We also want it to be 1 hour before the on-prem release
- - cron: '0 17 15 * *'
- jobs:
- release:
- runs-on: ubuntu-latest
- name: "Release a new version"
- steps:
- - id: calver
- if: ${{ !github.event.client_payload.version }}
- run: |
- DATE_PART=$(date +'%y.%-m')
- PATCH_VERSION=0
- while curl -sf -o /dev/null "https://api.github.com/repos/$GITHUB_REPOSITORY/git/ref/tags/$DATE_PART.$PATCH_VERSION"; do
- (( PATCH_VERSION++ ))
- done
- echo "::set-output name=version::"$DATE_PART.$PATCH_VERSION""
- - uses: actions/checkout@v2
- - uses: getsentry/craft@master
- if: ${{ !github.event.client_payload.skip_prepare }}
- with:
- action: prepare
- version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
- env:
- DRY_RUN: ${{ github.event.client_payload.dry_run }}
- GIT_COMMITTER_NAME: getsentry-bot
- GIT_AUTHOR_NAME: getsentry-bot
- EMAIL: bot@getsentry.com
- ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
- - uses: getsentry/craft@master
- with:
- action: publish
- version: ${{ github.event.client_payload.version || steps.calver.outputs.version }}
- env:
- DRY_RUN: ${{ github.event.client_payload.dry_run }}
- GIT_COMMITTER_NAME: getsentry-bot
- GIT_AUTHOR_NAME: getsentry-bot
- EMAIL: bot@getsentry.com
- ZEUS_API_TOKEN: ${{ secrets.ZEUS_API_TOKEN }}
- TWINE_USERNAME: '__token__'
- TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
- DOCKER_USERNAME: 'sentrybuilder'
- DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- - id: next-dev-version
- if: ${{ !github.event.client_payload.dry_run }}
- env:
- GIT_COMMITTER_NAME: getsentry-bot
- GIT_AUTHOR_NAME: getsentry-bot
- EMAIL: bot@getsentry.com
- run: |
- ./scripts/bump-version.sh '' $(date -d "$(echo '${{ github.event.client_payload.version || steps.calver.outputs.version }}' | sed -e 's/^\([0-9]\{2\}\)\.\([0-9]\{1,2\}\)\.[0-9]\+$/20\1-\2-1/') 1 month" +%y.%-m.0.dev0)
- git diff --quiet || git commit -anm 'meta: Bump new development version' && git push
|