-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 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,47 @@ | ||
name: Increment Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'Release-*' | ||
|
||
jobs: | ||
increment_tag: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
shell: bash | ||
run: | | ||
git config --global user.name "q2d2" | ||
git config --global user.email "q2d2.noreply@gmail.com" | ||
IFS='-' read -r _ release <<< $(git branch) | ||
echo "release=$release" >> $GITHUB_ENV | ||
echo "default_tag=$release.-1" >> $GITHUB_ENV | ||
- name: Get last tag | ||
id: get_last_tag | ||
shell: bash | ||
run: | | ||
last_tag=$(git describe --abbrev=0 --tags 2>/dev/null || echo ${{ env.default_tag }}) | ||
echo "last_tag=$last_tag" >> "$GITHUB_ENV" | ||
- name: Increment tag | ||
id: increment_tag | ||
shell: bash | ||
run: | | ||
last_tag=${{ env.last_tag }} | ||
IFS='.' read -r major minor patch <<< "$last_tag" | ||
incremented_tag="$major.$minor.$((patch + 1))" | ||
echo "incremented_tag=$incremented_tag" >> "$GITHUB_ENV" | ||
- name: Create new tag | ||
shell: bash | ||
run: | | ||
git tag -a ${{ env.incremented_tag }} -m "${{ env.incremented_tag }}" | ||
git push --follow-tags |
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,33 @@ | ||
name: Join a QIIME 2 release | ||
|
||
on: | ||
workflow_dispatch: {} | ||
|
||
env: | ||
release: 'Release-2023.5' | ||
tag: '2023.5.0.dev0' | ||
|
||
jobs: | ||
join: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.INSTALL_WORKFLOWS_PAT }} | ||
path: ./current-repo | ||
|
||
# Where it checks out master we will probably end up checking out dev | ||
# since it sounds like we will be calling our main branches dev now. | ||
- name: branch repo | ||
shell: bash | ||
run: | | ||
cd ./current-repo | ||
git config --global user.name "q2d2" | ||
git config --global user.email "q2d2.noreply@gmail.com" | ||
git checkout -b ${{ env.release }} | ||
git commit --allow-empty -m "${{ env.release }}" | ||
git push --set-upstream origin ${{ env.release }} | ||
git checkout master | ||
git commit --allow-empty -m "${{ env.release }}" | ||
git tag -a ${{ env.tag }} -m "${{ env.tag }}" | ||
git push --follow-tags |