Commit 529250f9 authored by WorldTeacher's avatar WorldTeacher
Browse files

fix: new ci

parent 9491ab60
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ include:
  - component: "$CI_SERVER_FQDN/to-be-continuous/semantic-release/gitlab-ci-semrel@4.0"
    inputs:
      changelog-enabled: true
      auto-release-enabled: false
      auto-release-enabled: true

# secret variables
# (define the variables below in your GitLab group/project variables)
@@ -25,26 +25,19 @@ stages:
  - production
zip-koplugin-release:
  stage: publish
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  image: registry.gitlab.com/gitlab-org/cli:latest
  rules:
    # run only for tags (semantic-release creates these)
    - if: "$CI_COMMIT_TAG"
  before_script:
    - apk add --no-cache zip curl bash git
    - apk add --no-cache zip bash git
  script:
    - echo "Generating version information from tag $CI_COMMIT_TAG"
    - bash generate-version.sh

    - echo "Creating koplugin release archive"
    - cd bookloresync.koplugin && zip -r ../bookloresync.koplugin.zip *.lua
    - cd ..
  artifacts:
    paths:
      - bookloresync.koplugin.zip
  release:
    tag_name: "$CI_COMMIT_TAG"
    name: "Release $CI_COMMIT_TAG"
    description: "KOReader plugin release $CI_COMMIT_TAG"
    assets:
      links:
        - name: "bookloresync.koplugin.zip"
          url: "$CI_PROJECT_URL/-/jobs/$CI_JOB_ID/artifacts/raw/bookloresync.koplugin.zip"

    # Attach to the *existing* release created by semantic-release
    # (display name + link type)
    - glab release upload "$CI_COMMIT_TAG" "bookloresync.koplugin.zip#bookloresync.koplugin.zip#package" --use-package-registry