diff options
| -rw-r--r-- | .github/workflows/build-artifacts.yml | 45 | ||||
| -rw-r--r-- | .github/workflows/go.yml | 22 |
2 files changed, 45 insertions, 22 deletions
diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml new file mode 100644 index 0000000..99a1b0f --- /dev/null +++ b/.github/workflows/build-artifacts.yml @@ -0,0 +1,45 @@ +name: Build Artifacts + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Install Mage + run: | + go install github.com/magefile/mage@v1.15.0 + echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" + + - name: Build plugin and standalone binaries + run: mage + + - name: Publish binaries to GitHub Release assets + if: github.event_name != 'pull_request' + uses: softprops/action-gh-release@v2 + with: + tag_name: build-${{ github.sha }} + name: Build ${{ github.sha }} + prerelease: true + files: | + build/rclone-studip + build/librcloneplugin_backend_studip.so + fail_on_unmatched_files: true diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index e642945..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.25.4' - - - name: Build - run: go build -v -o rclone-studip |
