diff --git a/.craft.yml b/.craft.yml new file mode 100644 index 00000000..412595a9 --- /dev/null +++ b/.craft.yml @@ -0,0 +1,12 @@ +minVersion: "0.27.2" +changelogPolicy: auto +artifactProvider: + name: none +statusProvider: + name: github + config: + contexts: + - 'Publish to GHCR' +preReleaseCommand: "" +targets: + - name: github diff --git a/.github/workflows/release-ghcr-version-tag.yml b/.github/workflows/release-ghcr-version-tag.yml new file mode 100644 index 00000000..c4fcc11d --- /dev/null +++ b/.github/workflows/release-ghcr-version-tag.yml @@ -0,0 +1,28 @@ +name: Release GHCR Versioned Image + +on: + release: + types: [prereleased, released] + +jobs: + release-ghcr-version-tag: + runs-on: ubuntu-latest + steps: + - name: Log in to GitHub Container Registry + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Tag release version + run: | + docker buildx imagetools create --tag \ + ghcr.io/getsentry/objectstore:${{ github.ref_name }} \ + ghcr.io/getsentry/objectstore:${{ github.sha }} + + - name: Tag latest version + run: | + docker buildx imagetools create --tag \ + ghcr.io/getsentry/objectstore:latest \ + ghcr.io/getsentry/objectstore:${{ github.sha }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f196d4bc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: self-hosted release + +on: + workflow_dispatch: + inputs: + version: + description: Version to release (optional) + required: false + force: + description: Force a release even when there are release-blockers (optional) + required: false + + 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 objectstore version" + steps: + - name: Get auth token + id: token + uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 + with: + app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} + private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 + with: + token: ${{ steps.token.outputs.token }} + fetch-depth: 0 + - name: Prepare release + uses: getsentry/action-prepare-release@3cea80dc3938c0baf5ec4ce752ecb311f8780cdc # v1.6.4 + env: + GITHUB_TOKEN: ${{ steps.token.outputs.token }} + with: + version: ${{ github.event.inputs.version }} + force: ${{ github.event.inputs.force }} + calver: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..a0cf709b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# CHANGELOG