Skip to content

Commit

Permalink
ci(workflow): add release workflow (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
picopock authored Apr 22, 2023
1 parent b5a5478 commit a173ca1
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

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

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Package files
run: |
mkdir mosdns-config-${{ steps.get_version.outputs.VERSION }}
tar -zcvf mosdns-config-${{ steps.get_version.outputs.VERSION }}.tar.gz ./mosdnsv4 ./mosdnsv5 ./README.md
zip -r mosdns-config-${{ steps.get_version.outputs.VERSION }}.zip ./mosdnsv4 ./mosdnsv5 ./README.md
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./mosdns-config-*
draft: false

0 comments on commit a173ca1

Please sign in to comment.