Create Release #64
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
--- | |
name: "Create Release" | |
on: | |
workflow_run: | |
workflows: ["Tag Release"] | |
types: | |
- completed | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
ref: ${{ env.LATEST_TAG }} | |
- name: Get the latest tag | |
run: | | |
git fetch --tags | |
LATEST_TAG="$(git describe --tags "$(git rev-list --tags --max-count=1)")" | |
echo "LATEST_TAG=${LATEST_TAG}" >> "$GITHUB_ENV" | |
- name: Pull LFS | |
run: git lfs pull | |
- name: Archive Release | |
uses: thedoctor0/[email protected] | |
with: | |
type: 'zip' | |
filename: 'Immutable-Passport.zip' | |
directory: './src/Packages' | |
path: './Passport' | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
configurationJson: | | |
{ | |
"pr_template": "- #{{TITLE}} (##{{NUMBER}})", | |
"categories": [ | |
{ | |
"title": "## Features", | |
"labels": ["feature", "feat"] | |
}, | |
{ | |
"title": "## Fixes", | |
"labels": ["fix"] | |
}, | |
{ | |
"title": "## Performance", | |
"labels": ["performance"] | |
}, | |
{ | |
"title": "## Documentation", | |
"labels": ["docs"] | |
}, | |
{ | |
"title": "## Chores", | |
"labels": ["chore"] | |
} | |
] | |
} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.LATEST_TAG }} | |
release_name: ${{ env.LATEST_TAG }} | |
body: ${{steps.github_release.outputs.changelog}} | |
draft: false | |
prerelease: false | |
- name: 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: ./src/Packages/Immutable-Passport.zip | |
asset_name: Immutable-Passport.zip | |
asset_content_type: application/zip |