Skip to content

Commit

Permalink
Add Github Action for release management
Browse files Browse the repository at this point in the history
  • Loading branch information
ewhanson committed May 17, 2023
1 parent f85d022 commit cc40307
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release plugin

on:
push:
tags:
- "v*.*.*-*"

jobs:
package_and_release:
name: Package and release
runs-on: ubuntu-latest

steps:
- name: Package
uses: actions/checkout@v3
- run: mkdir -p /tmp/files
# Creates a tar.gz file in /tmp/files that is named the same as the repository name and excludes the .git directory
- run: cd .. && tar cfz /tmp/files/$(echo "${{ github.repository }}" | awk -F'/' '{print $2}')-${GITHUB_REF#refs/*/}.tar.gz --exclude=.git $(echo "${{ github.repository }}" | awk -F'/' '{print $2}')
# Creates a checksum file that only includes the checksum string
- run: md5sum /tmp/files/$(echo "${{ github.repository }}" | awk -F'/' '{print $2}')-${GITHUB_REF#refs/*/}.tar.gz | awk '{print $1}' > /tmp/files/checksum.txt

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
/tmp/files/*
permissions:
contents: write

0 comments on commit cc40307

Please sign in to comment.