diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18fe151..04903fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Test 🧪 on: push: @@ -9,7 +9,7 @@ on: jobs: test: - name: Run tests and checks ️⚖️ + name: Test and check ️✅ runs-on: ubuntu-22.04 strategy: matrix: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7f5d435 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release 🏷️ + +on: + push: + tags: + - "v?[0-9]+.[0-9]+.[0-9]+*" + workflow_dispatch: + inputs: + tag: + description: "The existing tag to publish" + type: "string" + required: true + +jobs: + publish-release: + name: "Publish Release 📤️" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Publish release ${{ github.ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ github.ref }}" --draft --generate-notes + if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -eq 0 ]; then + exit 1 + fi + gh release edit "${{ github.ref }}" --draft=false