From af502d0ba5ed6b0ab674c08fcd06c8edc5fbcaa3 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Sun, 14 Jun 2020 17:27:41 +0300 Subject: [PATCH] build(gha): Add Craft releases as a GitHub action (#538) --- .craft.yml | 11 +++++++++++ .github/workflows/release.yml | 14 ++++++++++++++ scripts/bump-version.sh | 11 +++++++++++ 3 files changed, 36 insertions(+) create mode 100644 .craft.yml create mode 100644 .github/workflows/release.yml create mode 100644 scripts/bump-version.sh diff --git a/.craft.yml b/.craft.yml new file mode 100644 index 0000000..ff71152 --- /dev/null +++ b/.craft.yml @@ -0,0 +1,11 @@ +minVersion: "0.10.0" +github: + owner: getsentry + repo: onpremise +changelogPolicy: none +artifactProvider: + name: none +statusProvider: + name: github +targets: + - name: github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..05ad7c8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,14 @@ +on: + repository_dispatch: + types: [release] +jobs: + release: + runs-on: ubuntu-latest + name: "Release a new version" + steps: + - uses: actions/checkout@v2 + - uses: getsentry/craft-action + with: + action: prepare + version: ${{ github.event.client_payload.version }} + dry_run: ${{ github.event.client_payload.dry_run }} diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100644 index 0000000..2a197d8 --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -eux + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $SCRIPT_DIR/.. + +OLD_VERSION="$1" +NEW_VERSION="$2" + +VERSION=$2 +echo "New version: $VERSION"