Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremycook123 authored Dec 16, 2024
1 parent 5da5368 commit 0d0e206
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build

on:
push:
tags:
- '*.*.*'
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Package
run: |
echo packaging...
tar -czf release-${{ env.RELEASE_VERSION }}.tar.gz docker-compose.yaml vols
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: release-${{ env.RELEASE_VERSION }}
path: release-${{ env.RELEASE_VERSION }}.tar.gz

- name: Make Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: release-${{ env.RELEASE_VERSION }}
files: |
release-${{ env.RELEASE_VERSION }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0d0e206

Please sign in to comment.