forked from orange-cloudfoundry/k3s-boshrelease
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(github-action): refactor release process
Details: - commit on master generates a new version based on semvers - commit on PR generates a dev release
- Loading branch information
Showing
4 changed files
with
53 additions
and
115 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,48 @@ | ||
name: auto-release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Bump version and push tag | ||
id: bump-version | ||
uses: ietf-tools/semver-action@v1 | ||
with: | ||
token: ${{ github.token }} | ||
branch: master | ||
noVersionBumpBehavior: patch | ||
majorList: major | ||
|
||
- name: create bosh release | ||
id: create-bosh-release | ||
uses: orange-cloudfoundry/[email protected] | ||
with: | ||
target_branch: ${{github.ref_name}} | ||
tag_name: ${{ steps.bump-version.outputs.next}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
AWS_BOSH_ACCES_KEY_ID: ${{ secrets.AWS_BOSH_ACCES_KEY_ID }} | ||
AWS_BOSH_SECRET_ACCES_KEY: ${{ secrets.AWS_BOSH_SECRET_ACCES_KEY }} | ||
|
||
# see https://github.com/ncipollo/release-action | ||
- name: create github release | ||
id: create-github-release | ||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0 | ||
with: | ||
tag: ${{ steps.create-bosh-release.outputs.tagged_version }} | ||
draft: false | ||
allowUpdates: false # > indicates if we should update a release if it already exists. | ||
generateReleaseNotes: true | ||
artifacts: ./${{ steps.create-bosh-release.outputs.file }} | ||
artifactContentType: application/zip | ||
artifactErrorsFailBuild: true # > indicates if artifact read or upload errors should fail the build. |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.