diff --git a/.github/workflows/asciidoctor-ghpages.yml b/.github/workflows/asciidoctor-ghpages.yml index e070cfa..cabf5e4 100644 --- a/.github/workflows/asciidoctor-ghpages.yml +++ b/.github/workflows/asciidoctor-ghpages.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Includes the AsciiDoctor GitHub Pages Action to convert adoc files to # html and publish to gh-pages branch. diff --git a/.github/workflows/bindist-full.yml b/.github/workflows/bindist-full.yml deleted file mode 100644 index 368397e..0000000 --- a/.github/workflows/bindist-full.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Create a binary distribution (full) - -on: - workflow_call: - inputs: - release-version: - required: true - type: string - upload-url: - required: true - type: string - -jobs: - dist: - name: Binary distribution (full) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - id: filenames - name: Archive names - run: | - echo "diktat-cli-tar=diktat-cli-${{ inputs.release-version }}-full.tar" >>"${GITHUB_OUTPUT}" - echo "diktat-cli-tgz=diktat-cli-${{ inputs.release-version }}-full.tar.gz" >>"${GITHUB_OUTPUT}" - echo "diktat-cli-zip=diktat-cli-${{ inputs.release-version }}-full.zip" >>"${GITHUB_OUTPUT}" - shell: bash - - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 17 - - - name: Download dependencies - run: | - bin/diktat --no-download-progress -V - env: - GITHUB_TOKEN: ${{ github.token }} - shell: bash - - - name: Archive - run: | - tar cf '${{ steps.filenames.outputs.diktat-cli-tar }}' --exclude-backups --exclude-vcs --exclude-vcs-ignore --exclude='*.bat' --exclude='*.cmd' -C bin . - gzip -9 '${{ steps.filenames.outputs.diktat-cli-tar }}' - zip -jrX9 -Z bzip2 '${{ steps.filenames.outputs.diktat-cli-zip }}' bin - shell: bash - - # Upload a .tar.gz artifact, except when this is a release. - - name: Upload ${{ steps.filenames.outputs.diktat-cli-tgz }} - if: ${{ github.ref_type == 'branch' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.filenames.outputs.diktat-cli-tgz }} - path: ${{ steps.filenames.outputs.diktat-cli-tgz }} - if-no-files-found: error - retention-days: 1 - - # Upload a .zip artifact, except when this is a release. - - name: Upload ${{ steps.filenames.outputs.diktat-cli-zip }} - if: ${{ github.ref_type == 'branch' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.filenames.outputs.diktat-cli-zip }} - path: ${{ steps.filenames.outputs.diktat-cli-zip }} - if-no-files-found: error - retention-days: 1 - - - name: Upload release asset (${{ steps.filenames.outputs.diktat-cli-tgz }}) - id: upload-release-asset-tgz - if: ${{ github.ref_type == 'tag' }} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ inputs.upload-url }} - asset_path: ${{ steps.filenames.outputs.diktat-cli-tgz }} - asset_name: ${{ steps.filenames.outputs.diktat-cli-tgz }} - asset_content_type: application/gzip - - - name: Upload release asset (${{ steps.filenames.outputs.diktat-cli-zip }}) - id: upload-release-asset-zip - if: ${{ github.ref_type == 'tag' }} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ inputs.upload-url }} - asset_path: ${{ steps.filenames.outputs.diktat-cli-zip }} - asset_name: ${{ steps.filenames.outputs.diktat-cli-zip }} - asset_content_type: application/zip diff --git a/.github/workflows/bindist-thin.yml b/.github/workflows/bindist-thin.yml deleted file mode 100644 index 0c0bbe7..0000000 --- a/.github/workflows/bindist-thin.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Create a binary distribution (thin) - -on: - workflow_call: - inputs: - release-version: - required: true - type: string - upload-url: - required: true - type: string - -jobs: - dist: - name: Binary distribution (thin) - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - id: filenames - name: Archive names - run: | - echo "diktat-cli-tar=diktat-cli-${{ inputs.release-version }}.tar" >>"${GITHUB_OUTPUT}" - echo "diktat-cli-tgz=diktat-cli-${{ inputs.release-version }}.tar.gz" >>"${GITHUB_OUTPUT}" - echo "diktat-cli-zip=diktat-cli-${{ inputs.release-version }}.zip" >>"${GITHUB_OUTPUT}" - shell: bash - - - name: Archive - run: | - tar cf '${{ steps.filenames.outputs.diktat-cli-tar }}' --exclude-backups --exclude-vcs --exclude-vcs-ignore --exclude='*.bat' --exclude='*.cmd' -C bin diktat - gzip -9 '${{ steps.filenames.outputs.diktat-cli-tar }}' - zip -jrX9 -Z bzip2 '${{ steps.filenames.outputs.diktat-cli-zip }}' bin - shell: bash - - # Upload a .tar.gz artifact, except when this is a release. - - name: Upload ${{ steps.filenames.outputs.diktat-cli-tgz }} - if: ${{ github.ref_type == 'branch' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.filenames.outputs.diktat-cli-tgz }} - path: ${{ steps.filenames.outputs.diktat-cli-tgz }} - if-no-files-found: error - retention-days: 1 - - # Upload a .zip artifact, except when this is a release. - - name: Upload ${{ steps.filenames.outputs.diktat-cli-zip }} - if: ${{ github.ref_type == 'branch' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.filenames.outputs.diktat-cli-zip }} - path: ${{ steps.filenames.outputs.diktat-cli-zip }} - if-no-files-found: error - retention-days: 1 - - - name: Upload release asset (${{ steps.filenames.outputs.diktat-cli-tgz }}) - id: upload-release-asset-tgz - if: ${{ github.ref_type == 'tag' }} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ inputs.upload-url }} - asset_path: ${{ steps.filenames.outputs.diktat-cli-tgz }} - asset_name: ${{ steps.filenames.outputs.diktat-cli-tgz }} - asset_content_type: application/gzip - - - name: Upload release asset (${{ steps.filenames.outputs.diktat-cli-zip }}) - id: upload-release-asset-zip - if: ${{ github.ref_type == 'tag' }} - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ inputs.upload-url }} - asset_path: ${{ steps.filenames.outputs.diktat-cli-zip }} - asset_name: ${{ steps.filenames.outputs.diktat-cli-zip }} - asset_content_type: application/zip diff --git a/.github/workflows/move-marketplace-tag.yml b/.github/workflows/move-marketplace-tag.yml index e1c5fb7..67ca15e 100644 --- a/.github/workflows/move-marketplace-tag.yml +++ b/.github/workflows/move-marketplace-tag.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: tag name: Tag name diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf7f679..5da3702 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: name: Calculate the release version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Infer the release version. Assumes that tags are named `vX.Y.Z`. - id: version @@ -54,27 +54,9 @@ jobs: release-version: ${{ steps.version.outputs.release-version }} upload-url: ${{ steps.release.outputs.upload_url }} - bindist-thin: - name: Binary distribution (thin) - needs: [ version ] - uses: ./.github/workflows/bindist-thin.yml - with: - release-version: ${{ needs.version.outputs.release-version }} - upload-url: ${{ needs.version.outputs.upload-url }} - secrets: inherit - - bindist-full: - name: Binary distribution (full) - needs: [ version, bindist-thin ] - uses: ./.github/workflows/bindist-full.yml - with: - release-version: ${{ needs.version.outputs.release-version }} - upload-url: ${{ needs.version.outputs.upload-url }} - secrets: inherit - move-tag: name: Move the Marketplace tag - needs: [ version, bindist-thin, bindist-full ] + needs: [ version ] uses: ./.github/workflows/move-marketplace-tag.yml with: release-version: ${{ needs.version.outputs.release-version }} diff --git a/README.adoc b/README.adoc index fa92961..efd170d 100644 --- a/README.adoc +++ b/README.adoc @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: saveourtool/benedikt@v1 ---- @@ -311,7 +311,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: diktat uses: saveourtool/benedikt@v1