diff options
| author | seth <[email protected]> | 2024-05-21 19:53:34 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-05-21 20:07:55 -0400 |
| commit | e8615964144b92d910fca165debcb68a0ffecf88 (patch) | |
| tree | 6307a7a79fb3b1b8458554d3cb9ccf09bb2fad05 /.github/workflows | |
initial commitv0.1.0
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/ci.yaml | 33 | ||||
| -rw-r--r-- | .github/workflows/publish.yaml | 24 | ||||
| -rw-r--r-- | .github/workflows/release.yaml | 34 |
3 files changed, 91 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..c348932 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + workflow_dispatch: + +jobs: + test: + name: Run test + + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - name: Install Nix + uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27 + + - name: Install npins + run: | + nix profile install 'nixpkgs#npins' + + - name: Update npins sources + uses: ./. + with: + sources: "nixpkgs" + npins-directory: ./test/npins + commit-message: "test: update npins sources" diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a04230b --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,24 @@ +name: Publish + +on: + release: + types: [ released ] + workflow_dispatch: + inputs: + tag_name: + description: "Existing tag to publish" + required: true + +jobs: + publish: + name: Publish action + + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/publish-action@f784495ce78a41bac4ed7e34a73f0034015764bb # v0.3.0 + with: + source-tag: ${{ inputs.tag_name || github.event.release.tag_name }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..ac45bf3 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + tags: ["v*.*.*"] + workflow_dispatch: + inputs: + tag: + description: "Existing tag to draft a release for" + required: true + +jobs: + release: + name: Create release + + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - name: Run `gh` + env: + GH_TOKEN: ${{ github.token }} + TAG: ${{ inputs.tag || github.ref_name }} + run: | + gh release create \ + --draft \ + --notes-from-tag \ + --verify-tag \ + "$TAG" |
