-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for 202407.00 release information (#94)
- Loading branch information
Showing
10 changed files
with
132 additions
and
317 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,105 @@ | ||
name: Release automation | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit_id: | ||
description: 'Commit ID/branch to tag and create a release for' | ||
required: true | ||
version_number: | ||
description: 'Release Version (Eg, v202212.00)' | ||
required: true | ||
|
||
env: | ||
repository_compressed_name: ${{ github.event.repository.name }}v${{ github.event.inputs.version_number }} | ||
repostiory_zip_name: ${{ github.event.repository.name }}.zip | ||
|
||
jobs: | ||
tag-commit: | ||
name: Tag commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.commit_id }} | ||
- name: Configure git identity | ||
run: | | ||
git config --global user.name ${{ github.actor }} | ||
git config --global user.email ${{ github.actor }}@users.noreply.github.com | ||
- name: create a new branch that references commit id | ||
run: git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }} | ||
- name: Tag Commit and Push to remote | ||
run: | | ||
git tag ${{ github.event.inputs.version_number }} -a -m "Release ${{ github.event.inputs.version_number }}" | ||
git push origin --tags | ||
- name: Verify tag on remote | ||
run: | | ||
git tag -d ${{ github.event.inputs.version_number }} | ||
git remote update | ||
git checkout tags/${{ github.event.inputs.version_number }} | ||
git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }} | ||
create-zip: | ||
needs: tag-commit | ||
name: Create ZIP and verify package for release asset. | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install ZIP tools | ||
run: sudo apt-get install zip unzip | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.commit_id }} | ||
path: ${{ github.event.repository.name }} | ||
submodules: recursive | ||
- name: Checkout disabled submodules | ||
run: | | ||
cd ${{ github.event.repository.name }} | ||
git submodule update --init --checkout --recursive | ||
- name: Create ZIP | ||
run: | | ||
zip -r ${{ env.repostiory_zip_name }} ${{ github.event.repository.name }} -x "*.git*" | ||
ls ./ | ||
- name: Validate created ZIP | ||
run: | | ||
mkdir zip-check | ||
mv ${{ env.repostiory_zip_name }} zip-check | ||
cd zip-check | ||
unzip ${{ env.repostiory_zip_name }} -d ${{ env.repository_compressed_name }} | ||
ls ${{ env.repository_compressed_name }} | ||
diff -r -x "*.git*" ${{ env.repository_compressed_name }}/${{ github.event.repository.name }}/ ../${{ github.event.repository.name }}/ | ||
- name: Create artifact of ZIP | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.repostiory_zip_name }} | ||
path: zip-check/${{ env.repostiory_zip_name }} | ||
create-release: | ||
needs: create-zip | ||
name: Create Release and Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.version_number }} | ||
release_name: ${{ github.event.inputs.version_number }} | ||
body: ${{ github.event.inputs.version_number }} Release | ||
draft: false | ||
prerelease: false | ||
- name: Download ZIP artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ env.repostiory_zip_name }} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./${{ env.repostiory_zip_name }} | ||
asset_name: ${{ env.repostiory_zip_name }} | ||
asset_content_type: application/zip |
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 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 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.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.