diff --git a/.craft.yml b/.craft.yml new file mode 100644 index 0000000..4c0804d --- /dev/null +++ b/.craft.yml @@ -0,0 +1,7 @@ +minVersion: 0.29.2 +changelogPolicy: auto +artifactProvider: + name: none +targets: + - name: pub-dev + - name: github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b4ef20d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release +on: + workflow_dispatch: + inputs: + version: + description: Version to release + required: true + force: + description: Force a release even when there are release-blockers (optional) + required: false +jobs: + release: + runs-on: ubuntu-latest + name: "Release a new version" + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_RELEASE_PAT }} + fetch-depth: 0 + - name: Prepare release + uses: getsentry/action-prepare-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }} + with: + version: ${{ github.event.inputs.version }} + force: ${{ github.event.inputs.force }} diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100755 index 0000000..f7f092f --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -euo pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd $SCRIPT_DIR/.. + +OLD_VERSION="${1}" +NEW_VERSION="${2}" + +echo "Current version: ${OLD_VERSION}" +echo "Bumping version: ${NEW_VERSION}" + +# Bump version in pubspec.yaml +perl -pi -e "s/^version: .*/version: $NEW_VERSION/" pubspec.yaml