No workflow when create release through github

Hi, i’m having some troubles configuring my CircleCI workflow.
I’m migrating my project from TravisCI.

CircleCI says me “No workflow” when i create a new release through github(that creates a new tag).
I have one filter on tag with regex /^v.*/ for release job.

I’m new to CircleCI so i guess i missed something.

I’ve also tried:

  • no filters at all [Not worked]
  • branch filter, to ignore all branches [Not worked]
  • different tag regex [Not worked]
  • completely new tag [Not worked]
  • no-RC tag(i.e v2.3.0) [Not worked]

Error:

Settings:

version: 2.1

executors:
  scala_jdk_executor:
    docker:
      - image: circleci/openjdk:10-jdk
        environment:
          SBT_OPTS: "-Xms512M -Xmx1024M -XX:MaxMetaspaceSize=1g"

############################## JOBS #################################
jobs:
  build:
    executor: scala_jdk_executor
    parameters:
      version:
        description: "Scala version"
        type: string
    steps:

      - checkout

      #restore cache
      - restore_cache:
          keys:
            - sbt-advxml-v1-{{ checksum "build.sbt" }}
            - sbt-advxml-v1-

      #build and test
      - run:
          name: Compile, Format, Test and Coverage for << parameters.version >>
          command: sbt ++<< parameters.version >> clean scalafmtCheck coverage test coverageReport

      #push coverage reports
      - run:
          name: Upload reports to Codecov
          command: bash <(curl -s https://codecov.io/bash)
      - run:
          name: Upload reports to Codacy
          command: bash <(curl -Ls https://coverage.codacy.com/get.sh)

      #save cache
      - save_cache:
          key: sbt-advxml-v1-{{ checksum "build.sbt" }}
          paths:
            - "~/.ivy2/cache"
            - "~/.sbt"
            - "~/.m2"

  release:
    executor: scala_jdk_executor
    steps:
      - checkout
      - run: git fetch --tags
      - run:
          name: Release
          command: sbt clean compile ci-release

############################## WORKFLOWS #################################
workflows:
  version: 2
  build-and-release:
    jobs:
      #--------------- BUILD ---------------#
      - build:
          name: build 2.12.8
          version: 2.12.8

      - build:
          name: build 2.13.4
          version: 2.13.4

      #--------------- DEPLOY ---------------#
      - release:
          name: release
          requires:
            - build 2.12.8
            - build 2.13.4
          filters:
            tags:
              only: /^v.*/

Project: GitHub - geirolz/advxml: A lightweight, simple and functional library DSL to work with XML in Scala with Cats

CircleCI: CircleCI

Thanks for the support

Hi @geirolz Try getting rid of the version: 2 key from the workflows: block. You don’t need it because you defined the version at the top of your config. Also I see you’re using parameters which are only enabled in version: 2.1 and higher.

Hello @geirolz

In addition to @punkdata’s comment, I’d also suggest adding the tag filter to the two build jobs.

By default , CircleCI will build for all branches, but won’t build for any tag.

The release job requires both build jobs, so the tag filter needs to be added there too:

workflows:
  build-and-release:
    jobs:
      #--------------- BUILD ---------------#
      - build:
          name: build 2.12.8
          version: 2.12.8
          filters:
            tags:
              only: /^v.*/

      - build:
          name: build 2.13.4
          version: 2.13.4
          filters:
            tags:
              only: /^v.*/

      #--------------- DEPLOY ---------------#
      - release:
          name: release
          requires:
            - build 2.12.8
            - build 2.13.4
          filters:
            tags:
              only: /^v.*/
1 Like

Thank you guys! I’ve resolved using the same filter also on the build!

1 Like