Skip to content

Commit df74503

Browse files
authored
Merge pull request #1 from praw-dev/praw.release
Use praw-release
2 parents cc81493 + e5dd81e commit df74503

4 files changed

Lines changed: 17 additions & 59 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly

.github/workflows/manual_tag_release.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/prepare_release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,26 @@ jobs:
1111
cache: pip
1212
python-version: 3.x
1313
- name: Install dependencies
14-
run: pip install packaging
14+
run: pip install https://github.com/praw-dev/praw-release/archive/main.zip
1515
- name: Prepare Git Variables
1616
run: |
1717
git config --global author.email ${{ github.actor }}@users.noreply.github.com
1818
git config --global author.name ${{ github.actor }}
1919
git config --global committer.email noreply@github.com
2020
git config --global committer.name GitHub
21-
- name: Set desired version
21+
- name: Normalize version and update in code
2222
run: |
23-
tools/set_version.py ${{ github.event.inputs.version }} > tmp_version
23+
praw-release bump ${{ github.event.repository.name }} ${{ github.event.inputs.version }} > tmp_version
2424
echo "version=$(cat tmp_version)" >> $GITHUB_ENV
25-
- name: Commit desired version
25+
rm tmp_version
26+
- name: Commit changes with desired version
2627
run: git commit -am "Bump to v${{ env.version }}"
27-
- name: Set development version
28+
- name: Update code with next development version
2829
run: |
29-
tools/set_version.py Unreleased > tmp_version
30+
praw-release bump ${{ github.event.repository.name }} unreleased > tmp_version
3031
echo "dev_version=$(cat tmp_version)" >> $GITHUB_ENV
3132
rm tmp_version
32-
- name: Commit development version
33+
- name: Commit changes with development version
3334
run: git commit -am "Set development version v${{ env.dev_version }}"
3435
- name: Create Pull Request
3536
uses: peter-evans/create-pull-request@v6

.github/workflows/tag_release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@ jobs:
1313
cache: pip
1414
python-version: 3.x
1515
- name: Install dependencies
16-
run: pip install packaging docutils
16+
run: pip install https://github.com/praw-dev/praw-release/archive/main.zip
1717
- name: Extract Version
1818
run: |
1919
git checkout HEAD^2^
2020
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_ENV
21-
git log --format=%B -n 1 | ./tools/bump_version.py > tmp_version
21+
git log --format=%B -n 1 | praw-release extract-version > tmp_version
2222
echo "version=$(cat tmp_version)" >> $GITHUB_ENV
2323
cat tmp_version | python -c 'import sys; from packaging import version; print(int(version.Version(sys.stdin.readline()).is_prerelease))' > tmp_is_prerelease
2424
echo "is_prerelease=$(cat tmp_is_prerelease)" >> $GITHUB_ENV
2525
- name: Extract Change Log
26-
run: |
27-
echo ${{ env.version }} | ./tools/extract_log_entry.py > version_changelog
26+
run: praw-release changes ${{ env.version }} > version_changelog
2827
- env:
2928
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3029
name: Create GitHub Release

0 commit comments

Comments
 (0)