Skip to content

Commit cecdf1b

Browse files
committed
Add craft with target hex
1 parent 0e238fe commit cecdf1b

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.craft.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
minVersion: 0.34.4 # TODO-neel after craft release
2+
changelogPolicy: auto
3+
artifactProvider:
4+
name: none
5+
targets:
6+
- name: hex

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to release
8+
required: true
9+
force:
10+
description: Force a release even when there are release-blockers (optional)
11+
required: false
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
name: "Release a new version"
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
token: ${{ secrets.GH_RELEASE_PAT }}
21+
fetch-depth: 0
22+
- name: Prepare release
23+
uses: getsentry/action-prepare-release@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
26+
with:
27+
version: ${{ github.event.inputs.version }}
28+
force: ${{ github.event.inputs.force }}

scripts/bump-version.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
SCRIPT_DIR="$( dirname "$0" )"
5+
cd $SCRIPT_DIR/..
6+
7+
OLD_VERSION="${1}"
8+
NEW_VERSION="${2}"
9+
10+
echo "Current version: $OLD_VERSION"
11+
echo "Bumping version: $NEW_VERSION"
12+
13+
function replace() {
14+
! grep "$2" $3
15+
perl -i -pe "s/$1/$2/g" $3
16+
grep "$2" $3 # verify that replacement was successful
17+
}
18+
19+
replace "\@version \"[0-9.]+\"" "\@version \"$NEW_VERSION\"" ./mix.exs

0 commit comments

Comments
 (0)