Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 GitHub action to automate release based on semantic versioning #499

Merged
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a60aa76
ci: add release.yml to help automate release versions
scottc943 Jan 28, 2024
824e44e
Merge pull request #1 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
fbd2154
ci: add release.yml to help automate release versions - edited file f…
scottc943 Jan 28, 2024
e208462
Merge pull request #2 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
a945c00
ci: add release.yml to help automate release versions - I had a typo …
scottc943 Jan 28, 2024
4063eb5
Merge pull request #3 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
6b75b41
ci: add release.yml to help automate release versions - Fixing the re…
scottc943 Jan 28, 2024
3720fb1
Merge pull request #4 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
8e12d75
ci: add release.yml to help automate release versions. Lowercased V s…
scottc943 Jan 28, 2024
d482d28
Merge pull request #5 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
857f52b
ci: changing structure of release.yml to be easier to understand
scottc943 Jan 28, 2024
17cc2b4
Merge pull request #6 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
0dac204
ci: #minor changes made
scottc943 Jan 28, 2024
5fc189d
Merge pull request #7 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
7c0100e
ci: #minor changes made to make rolling and stable both release branches
scottc943 Jan 28, 2024
b0f53d4
Merge pull request #8 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
1ec4d00
ci: #minor changes to hopefully turn off pre-release
scottc943 Jan 28, 2024
5c41deb
Merge pull request #9 from scottc943/FEATURE/400_GitHubActions-automa…
scottc943 Jan 28, 2024
39a23e3
ci: #minor change - trying to make pre-release suffic set to nothing
scottc943 Jan 28, 2024
ac796bc
Merge pull request #10 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
1252d51
ci: #minor change - removed older release action for a better up to d…
scottc943 Jan 28, 2024
36fbe73
Merge pull request #11 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
bb18308
ci: #minor change
scottc943 Jan 28, 2024
06947d5
Merge pull request #12 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
08bd47b
ci: #minor change to fixed the pre-release issue
scottc943 Jan 28, 2024
421ca72
Merge pull request #13 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
c5ee4aa
ci: #minor change to fixed the pre-release issue again
scottc943 Jan 28, 2024
2032f60
Merge pull request #14 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
7c36c3e
ci: #minor change to fixed the pre-release issue again2
scottc943 Jan 28, 2024
832cea0
Merge pull request #15 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
392901f
ci: changed action for tag. I believe it was causing errors
scottc943 Jan 28, 2024
3426c24
Merge pull request #16 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
2b3bfd9
ci: missing }
scottc943 Jan 28, 2024
28b15a3
Merge pull request #17 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
96e786b
ci: testing some things
scottc943 Jan 28, 2024
35a9d64
Merge pull request #18 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
07ab796
ci: fixing self inflicted error where I forgot to put an ID in
scottc943 Jan 28, 2024
2269f82
Merge pull request #19 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
89f3ae8
ci: fixing to make the release branch rolling
scottc943 Jan 28, 2024
479de09
Merge pull request #20 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
29dece3
major: testing updating major
scottc943 Jan 28, 2024
62748a3
Merge pull request #21 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
4ed6a1c
BREAKING CHANGE: removed changelog action
scottc943 Jan 28, 2024
96688e1
Merge pull request #22 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
c7584ad
ci: reset commit and removed changelog
scottc943 Jan 28, 2024
4c60e41
Merge pull request #23 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 28, 2024
0825e78
ci: changed action for tag. I believe it was causing errors
scottc943 Jan 28, 2024
2f41a4f
ci: missing }
scottc943 Jan 28, 2024
74abaa7
ci: testing some things
scottc943 Jan 28, 2024
750204d
ci: fixing self inflicted error where I forgot to put an ID in
scottc943 Jan 28, 2024
4a7ead5
ci: fixing to make the release branch rolling
scottc943 Jan 28, 2024
a597525
ci: reset commit and removed changelog
scottc943 Jan 28, 2024
fab6c40
ci: added step to change Cargo.toml app version to the latest tag ver…
scottc943 Jan 29, 2024
d01b89e
Merge branch 'rolling' into FEATURE/400_GitHubActions-automate-releas…
scottc943 Jan 29, 2024
5631550
Merge pull request #24 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 29, 2024
7e02b6f
ci: using echo and double quotes in the appversion variable. Testing now
scottc943 Jan 29, 2024
bc8608c
Merge branch 'FEATURE/399_GitHubActions-automate-release-versions-PR'…
scottc943 Jan 29, 2024
c9c54f6
Merge pull request #25 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 29, 2024
9df36ae
ci: testing autocommit
scottc943 Jan 29, 2024
3308b02
Merge pull request #26 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 29, 2024
8f8e1b7
Apply automatic changes
scottc943 Jan 29, 2024
e0b0d34
ci: testing autocommit further
scottc943 Jan 29, 2024
d40e5ed
Merge branch 'FEATURE/400_GitHubActions-automate-release-versions-PR'…
scottc943 Jan 29, 2024
599fa43
Merge pull request #27 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 29, 2024
559c7fc
ci: testing autocommit: removing tagging since it creates another tag…
scottc943 Jan 29, 2024
ac6f95e
Merge pull request #28 from scottc943/FEATURE/400_GitHubActions-autom…
scottc943 Jan 29, 2024
e0b683b
Apply automatic changes
scottc943 Jan 29, 2024
2e653d1
ci: testing autocommit with branch protection and doing a PR to rolling
scottc943 Jan 29, 2024
75468a2
Merge branch 'rolling' into FEATURE/400_GitHubActions-automate-releas…
scottc943 Jan 29, 2024
976af53
Apply automatic changes
scottc943 Jan 29, 2024
5c98982
ci: testing PR create and merge - removed the if that was causing it …
scottc943 Jan 29, 2024
f0c365a
Merge branch 'FEATURE/400_GitHubActions-automate-release-versions-PR'…
scottc943 Jan 29, 2024
6e60be3
ci: testing PR create and merge - removed the if that was causing it …
scottc943 Jan 29, 2024
c95bb7d
Apply automatic changes
scottc943 Jan 29, 2024
d9841bf
ci: testing PR create and merge - fixed permission issues
scottc943 Jan 29, 2024
0ec2564
Merge branch 'FEATURE/400_GitHubActions-automate-release-versions-PR'…
scottc943 Jan 29, 2024
542f27f
ci: testing PR create and merge - fixed permission issues
scottc943 Jan 29, 2024
39d9dcc
Apply automatic changes
scottc943 Jan 29, 2024
c62a0c0
ci: testing PR create and merge - potentially fixed PR issue
scottc943 Jan 29, 2024
a7b8be2
Apply automatic changes
scottc943 Jan 29, 2024
7748ed2
ci: testing PR create and merge - potentially fixed PR issue2
scottc943 Jan 29, 2024
a5284e8
ci: testing PR create and merge - potentially fixed PR issue + fixing…
scottc943 Jan 29, 2024
4c056a3
ci: testing PR create and merge - testing PAT
scottc943 Jan 29, 2024
31837eb
ci: testing PR create and merge - testing to see if merge loop stops
scottc943 Jan 29, 2024
208bdad
ci: adding in cargo.toml version in auto git commit
scottc943 Jan 30, 2024
0ba380e
Update Cargo.toml
scottc943 Jan 30, 2024
bb9a68c
Merge branch 'rolling' into FEATURE/400_GitHubActions-automate-releas…
scottc943 Jan 30, 2024
4cb656e
Merge branch 'rolling' into FEATURE/400_GitHubActions-automate-releas…
alamin655 Jan 30, 2024
df6378b
ci: adding in steps to regenerate the Cargo.lock file
scottc943 Jan 30, 2024
31ccc4f
ci: adding in steps to regenerate the Cargo.lock file - fixing commit…
scottc943 Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Bump release version
on:
pull_request:
branches: [rolling]
types:
- closed

permissions:
contents: write
pull-requests: write
repository-projects: write

concurrency: production

jobs:
build:
name: bump tag version and release
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
fetch-depth: 0
- name: Bump version and push tag
id: version-bump
uses: hennejg/github-tag-action@v4.3.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: rolling
- name: create branch
uses: peterjgrainger/action-create-branch@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: update-from-${{ github.sha }}
- name: update cargo.toml
run: |
appversion=$(echo "${{ steps.version-bump.outputs.new_tag }}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
sed -i -e "s/^version = .*/version = \"$appversion\"/" Cargo.toml
- run: rustup toolchain install stable --profile minimal
- run: rustup update stable && rustup default stable
- name: regenerate cargo.lock
run: cargo generate-lockfile
- name: auto commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[skip ci] updating app version to ${{ steps.version-bump.outputs.new_tag }}"
branch: update-from-${{ github.sha }}
# create PR using GitHub CLI
- name: create PR with update info
id: create-pr
run: gh pr create --base rolling --head update-from-${{ github.sha }} --title 'Merge new update into rolling' --body 'Created by Github action'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# merge PR using GitHub CLI
- name: merge PR with update info
id: merge-pr
run: gh pr merge --admin --merge --subject 'Merge update info' --delete-branch
env:
GH_TOKEN: ${{ secrets.ADMIN_RIGHTS_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
name: ${{ steps.version-bump.outputs.new_tag }}
tag_name: ${{ steps.version-bump.outputs.new_tag }}
prerelease: false
env:
GITHUB_REPOSITORY: ${{ github.repository }}
Loading