diff --git a/.github/workflows/ci-dev.yaml b/.github/workflows/ci-dev.yaml new file mode 100644 index 0000000..f66c713 --- /dev/null +++ b/.github/workflows/ci-dev.yaml @@ -0,0 +1,12 @@ +# Example of workflow trigger for calling workflow (the client). +name: ci-dev +on: + pull_request: + branches: ["dev"] + push: + branches: ["dev"] +jobs: + ci: + uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev + with: + distro: core \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3d08545..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This file is automatically generated by busywork.qiime2.org and -# template-repos - any manual edits made to this file will be erased when -# busywork performs maintenance updates. - -name: ci - -on: - pull_request: - push: - branches: - - master - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: checkout source - uses: actions/checkout@v2 - - - name: set up python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: install dependencies - run: python -m pip install --upgrade pip - - - name: lint - run: | - pip install -q https://github.com/qiime2/q2lint/archive/master.zip - q2lint - pip install -q flake8 - flake8 - - build-and-test: - needs: lint - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - name: checkout source - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: set up git repo for versioneer - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - - uses: qiime2/action-library-packaging@alpha1 - with: - package-name: q2-alignment - build-target: dev - additional-tests: py.test --pyargs q2_alignment - library-token: ${{ secrets.LIBRARY_TOKEN }} diff --git a/.github/workflows/increment-release.yml b/.github/workflows/increment-release.yml deleted file mode 100644 index 7746aa2..0000000 --- a/.github/workflows/increment-release.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Increment Release - -on: - push: - branches: - - 'Release-*' - -jobs: - increment_tag: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup - shell: bash - run: | - git config --global user.name "q2d2" - git config --global user.email "q2d2.noreply@gmail.com" - IFS='-' read -r _ release <<< $(git branch) - echo "release=$release" >> $GITHUB_ENV - echo "default_tag=$release.-1" >> $GITHUB_ENV - - - name: Get last tag - id: get_last_tag - shell: bash - run: | - last_tag=$(git describe --abbrev=0 --tags 2>/dev/null || echo ${{ env.default_tag }}) - echo "last_tag=$last_tag" >> "$GITHUB_ENV" - - - name: Increment tag - id: increment_tag - shell: bash - run: | - last_tag=${{ env.last_tag }} - IFS='.' read -r major minor patch <<< "$last_tag" - incremented_tag="$major.$minor.$((patch + 1))" - echo "incremented_tag=$incremented_tag" >> "$GITHUB_ENV" - - - name: Create new tag - shell: bash - run: | - git tag -a ${{ env.incremented_tag }} -m "${{ env.incremented_tag }}" - git push --follow-tags \ No newline at end of file diff --git a/.github/workflows/install-workflows.yml b/.github/workflows/install-workflows.yml deleted file mode 100644 index a7a8d6e..0000000 --- a/.github/workflows/install-workflows.yml +++ /dev/null @@ -1,72 +0,0 @@ -## VERSION 3 -name: Install QIIME 2 workflows to your repository - -on: - workflow_dispatch: {} - -env: - current_version_path: './current-repo/.github/workflows/install-workflows.yml' - latest_version_path: './template-repo/workflow-templates/install-workflows.yml' - -jobs: - install: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.INSTALL_WORKFLOWS_PAT }} - path: ./current-repo - - - uses: actions/checkout@v3 - with: - repository: qiime2/.github - path: ./template-repo - - - id: current-version - shell: bash - run: | - echo version=$( - head -n 1 ${{ env.current_version_path }} | cut -d' ' -f3 - ) >> $GITHUB_OUTPUT - - - id: latest-version - shell: bash - run: | - echo version=$( - head -n 1 ${{ env.latest_version_path }} | cut -d' ' -f3 - ) >> $GITHUB_OUTPUT - - # If workflow installer is not up-to-date, update it and notify user - - name: compare versions - if: ${{ steps.current-version.outputs.version != steps.latest-version.outputs.version }} - shell: bash - run: | - cp ${{ env.latest_version_path }} ${{ env.current_version_path }} - - - name: commit latest version - if: ${{ steps.current-version.outputs.version != steps.latest-version.outputs.version }} - run: | - cd ./current-repo - git config --global user.name "q2d2" - git config --global user.email "q2d2.noreply@gmail.com" - git commit -am "ci: updating install workflows to ${{ steps.latest-version.outputs.version }}" - git push - - - name: please re-run - if: ${{ steps.current-version.outputs.version != steps.latest-version.outputs.version }} - shell: bash - run: | - echo '::notice title=workflow-reinstalled::Please re-run this workflow, as it has been updated with new instructions!' - - # If workflow installer is up-to-date, do other stuff - - name: copy qiime2-workflows - if: ${{ steps.current-version.outputs.version == steps.latest-version.outputs.version }} - shell: bash - run: | - cd ./current-repo - cp -r ../template-repo/qiime2-workflows/* ./.github/ - git config --global user.name "q2d2" - git config --global user.email "q2d2.noreply@gmail.com" - git add .github - git commit -am "ci: adding new workflows" - git push diff --git a/.github/workflows/join-release.yaml b/.github/workflows/join-release.yaml new file mode 100644 index 0000000..8669749 --- /dev/null +++ b/.github/workflows/join-release.yaml @@ -0,0 +1,6 @@ +name: join-release +on: + workflow_dispatch: {} +jobs: + release: + uses: qiime2/distributions/.github/workflows/lib-join-release.yaml@dev \ No newline at end of file diff --git a/.github/workflows/join-release.yml b/.github/workflows/join-release.yml deleted file mode 100644 index e7307ff..0000000 --- a/.github/workflows/join-release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Join a QIIME 2 release - -on: - workflow_dispatch: {} - -env: - release: 'Release-2023.5' - tag: '2023.5.0.dev0' - -jobs: - join: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - token: ${{ secrets.INSTALL_WORKFLOWS_PAT }} - path: ./current-repo - - # Where it checks out master we will probably end up checking out dev - # since it sounds like we will be calling our main branches dev now. - - name: branch repo - shell: bash - run: | - cd ./current-repo - git config --global user.name "q2d2" - git config --global user.email "q2d2.noreply@gmail.com" - git checkout -b ${{ env.release }} - git commit --allow-empty -m "${{ env.release }}" - git push --set-upstream origin ${{ env.release }} - git checkout master - git commit --allow-empty -m "${{ env.release }}" - git tag -a ${{ env.tag }} -m "${{ env.tag }}" - git push --follow-tags diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml new file mode 100644 index 0000000..8b0f228 --- /dev/null +++ b/.github/workflows/tag-release.yaml @@ -0,0 +1,7 @@ +name: tag-release +on: + push: + branches: ["Release-*"] +jobs: + tag: + uses: qiime2/distributions/.github/workflows/lib-tag-release.yaml@dev \ No newline at end of file