diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 0000000..e3b7f28 --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,29 @@ +name: Create release +on: + pull_request_target: + branches: + - main + types: + - closed +permissions: + contents: write + actions: write +jobs: + release: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: install autotag binary + run: curl -sL https://git.io/autotag-install | sudo sh -s -- -b /usr/bin + - name: create release + run: |- + TAG=$(autotag) + git tag $TAG + git push origin $TAG + gh release create $TAG + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..7c148f4 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,32 @@ +name: goreleaser + +on: + workflow_dispatch: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v3 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 0000000..e9a2f59 --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,26 @@ +name: lint-test +on: [push] +permissions: + contents: read + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v4 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54 + + - name: Install dependencies + run: go get . + + - name: Build + run: go build -v ./... + + - name: Test with the Go CLI + run: go test -v ./... diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..55550f7 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,4 @@ +linters: + enable: + - gofmt + diff --git a/README.md b/README.md new file mode 100644 index 0000000..816b8d8 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# go-islandora + +Drupal/Islandora go library diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5db5d35 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/lehigh-university-libraries/go-islandora + +go 1.22.2 diff --git a/main.go b/main.go new file mode 100644 index 0000000..94d9258 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "log/slog" + +func main() { + slog.Info("OK") +}