From 86583d9ded55d3498da60d13874610d089200420 Mon Sep 17 00:00:00 2001 From: joaomhmpereira Date: Thu, 15 Aug 2024 14:43:15 +0100 Subject: [PATCH] Add workflow to automate new package releases (closes #26) --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ab75f35 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Create tarball + run: | + tar -czvf release.tar.gz . + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./release.tar.gz + asset_name: release.tar.gz + asset_content_type: application/gzip \ No newline at end of file