Change gitlab API library to gitlab4j-api #80
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
package: | |
name: Build package & docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 # Oldest supported version | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install build-essential debhelper fakeroot | |
- name: Build | |
uses: eskatos/gradle-command-action@v3 | |
with: | |
arguments: assembleDist | |
- name: Store docs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: build/doc | |
- name: Store package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package | |
path: build/distributions | |
test: | |
name: Test | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
strategy: | |
matrix: | |
include: | |
# Gitlab | |
- env: 'GITLAB_VERSION=latest' | |
- env: 'GITLAB_VERSION=13.7.5-ce.0' # Gitlab >= 13.7 enables chunked upload | |
- env: 'GITLAB_VERSION=11.0.3-ce.0' # Gitlab >= 11.0 no longer has API v3 (issue #176) | |
- env: 'GITLAB_VERSION=10.2.5-ce.0' # Gitlab >= 10.2 no longer has /session endpoint (issue #154) | |
- env: 'GITLAB_VERSION=9.3.3-ce.0' # The earliest supported GitLab version | |
# Gitea | |
- env: 'GITEA_VERSION=1.18' | |
- env: 'GITEA_VERSION=1.9.0' # The earliest supported Gitea version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Set up env | |
if: matrix.env != '' | |
run: echo "${{ matrix.env }}" >> "${GITHUB_ENV}" | |
- name: Run tests | |
uses: eskatos/gradle-command-action@v3 | |
with: | |
arguments: test | |
docs: | |
name: Publish docs | |
needs: [package, test] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: build/doc | |
- name: Publish | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force_orphan: true | |
publish_dir: build/doc | |
release: | |
name: Publish release | |
runs-on: ubuntu-latest | |
needs: [package] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v4 | |
with: | |
name: package | |
path: build/distributions | |
- name: Publish to GitHub Releases | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
build/distributions/debian_debian/git-as-svn* | |
build/distributions/git-as-svn* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Cloudsmith CLI | |
run: pip install --upgrade --user cloudsmith-cli | |
- name: Publish to Cloudsmith | |
env: | |
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | |
run: find build/distributions -name "*.deb" -print0 | xargs -0 -n1 cloudsmith push deb git-as-svn/git-as-svn/any-distro/any-version |