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

Add: upload-and-release.yml #2

Merged
merged 7 commits into from
Jul 4, 2024
Merged
Changes from all commits
Commits
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
29 changes: 23 additions & 6 deletions .github/workflows/upload-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,55 @@ on:
jobs:
release:
runs-on: windows-latest
permissions:
contents: write
actions: write
attestations: write
steps:
- name: Checkout code
uses: actions/checkout@v2

# This is how we give the release some meaningful info - based off the last commit message and description
- name: Get last commit message
id: get_commit_message
run: echo "::set-output name=commit_message::$(git log -1 --pretty=format:'%s%n%n%b')"
#run: echo "::set-output name=commit_message::$(git log -1 --pretty=format:'%s%n%n%b')"
run: echo "commit_message=$(git log -1 --pretty=format:'%s%n%n%b')" >> $GITHUB_ENV

#- name: Get latest tag
# id: get_latest_tag
#run: echo "::set-output name=tag::$(git describe --abbrev=0 --tags)"

#- name: Increment tag
# id: increment_tag
#run: echo "::set-output name=tag::$(python increment_tag.py ${{ steps.get_latest_tag.outputs.tag }})"


- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
release_name: Automated Windsong Lyre Download
tag_name: v1.0.0 #todo: automate this incrementation later on
body: ${{ env.commit_message }}
#body: ${{ github.event.pull_request.title }} # Use the pull request title only as the release info
body: ${{ steps.get_commit_message.outputs.commit_message }}
#body: ${{ steps.get_commit_message.outputs.commit_message }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: automated-windsong-lyre
path: ./downloaded-artifact/

# Add any other steps you need (e.g., creating a zip file, etc.)

- name: Upload release asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./downloaded-artifact/*
asset_name: automated-windsong-lyre.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading