Skip to content

Commit

Permalink
Add gh-action to create releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimafisk committed Oct 31, 2024
1 parent 242d8fc commit 4729af8
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create Release on Tag

on:
push:
tags:
- 'v*' # Triggers on any tag that starts with 'v'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for creating releases

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Important for getting all tags

- name: Create ZIP archive
run: |
zip -r osxcross-target.zip . -x ".git/*" ".github/*"
tar -czf osxcross-target.tar.gz --exclude=".git" --exclude=".github" .
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
generate_release_notes: true # Generate release notes automatically from commits
prerelease: ${{ contains(github.ref, '-') }} # Allows marking a pre-release based on tag format (e.g., v1.0.0-beta)
files: |
osxcross-target.zip
osxcross-target.tar.gz

0 comments on commit 4729af8

Please sign in to comment.