-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add release workflow for Craft automation (#25)
- Loading branch information
1 parent
14a3781
commit 7d90513
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
minVersion: 0.29.2 | ||
changelogPolicy: auto | ||
artifactProvider: | ||
name: none | ||
targets: | ||
- name: pub-dev | ||
- name: github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |