From d71ac833182a1bee9feed081fb1356d3c927fda3 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Wed, 8 Feb 2023 15:08:55 +0000 Subject: [PATCH] Delete dead release workflow Hasn't been run for two years, I conclude it's not used any more. --- .github/workflows/build.yml | 174 ------------------------------------ 1 file changed, 174 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b7e8626929..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: Release - -on: - workflow_dispatch: - inputs: - version: - description: 'HLS version' - required: true - type: string - tag: - description: 'HLS tag' - required: false - type: string - project: - description: 'Gitlab project number' - type: number - required: false - default: 1180 - release: - types: [created] - -jobs: - # generates a custom tarball with sources, used by `ghcup compile hls` - src-tar: - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v3 - - - name: Set hls release version - run: | - HLS_VER="${{ github.event.release.tag_name }}" - if [[ -z $HLS_VER ]]; then - HLS_VER=${{ github.sha }} - HLS_VER=${HLS_VER:0:5} - fi - echo "HLS_VER=$HLS_VER" >> $GITHUB_ENV - - - name: Create source tarball - run: | - mkdir src-dist - git archive --prefix=haskell-language-server-${{ env.HLS_VER }}/ \ - --format=tar.gz \ - -o src-dist/haskell-language-server.tar.gz \ - HEAD - - - name: Upload source tarball to the release - if: ${{ github.event.release.upload_url != '' }} - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: src-dist/haskell-language-server.tar.gz - asset_name: haskell-language-server-${{ env.HLS_VER }}-src.tar.gz - asset_content_type: application/gzip - - - name: Upload source tarball to workflow artifacts - uses: actions/upload-artifact@v3 - with: - name: haskell-language-server-${{ env.HLS_VER }}-src.tar.gz - path: src-dist/haskell-language-server.tar.gz - - # this generates .gz tarfiles containing binaries for all GHC versions and OS's - # used by `ghcup install hls` - tar: - runs-on: ubuntu-latest - steps: - - name: Download tarballs from gitlab - run: | - set -eux - - if [ -n "${{ github.event.inputs.project }}" ] ; then - proj=${{ github.event.inputs.project }} - else - proj=1180 - fi - - if [ -n "${{ github.event.release.tag_name }}" ] ; then - tag=${{ github.event.release.tag_name }} - ver=${tag#v} - elif [ -n "${{ github.event.inputs.version }}" ] ; then - ver=${{ github.event.inputs.version }} - if [ -n "${{ github.event.inputs.tag }}" ] ; then - tag=${{ github.event.inputs.tag }} - else - tag=v${ver} - fi - fi - - base_url="https://gitlab.haskell.org/api/v4/projects/${proj}/jobs/artifacts/${tag}/raw" - - # unix like platforms - for plat in aarch64-apple-darwin \ - aarch64-deb10-linux \ - armv7-deb10-linux \ - x86_64-apple-darwin \ - x86_64-unknown-freebsd12 \ - x86_64-unknown-freebsd13 \ - x86_64-alpine3.12-linux \ - x86_64-centos7-linux \ - x86_64-deb9-linux \ - x86_64-deb10-linux \ - x86_64-fedora27-linux ; do - url="${base_url}/out/haskell-language-server-${ver}-${plat}.tar.xz?job=tar-$(echo "${plat/alpine3.12/alpine}" | awk -F '-' '{ print ($3 == "darwin" || $2 == "unknown") ? $1 "-" $3 : $1 "-" $3 "-" $2 }')" - curl -f -o "haskell-language-server-${ver}-${plat}.tar.xz" "${url}" - done - unset plat url - - # windows - curl -f -o "haskell-language-server-${ver}-x86_64-unknown-mingw32.zip" \ - "${base_url}/out/haskell-language-server-${ver}-x86_64-unknown-mingw32.zip?job=tar-x86_64-windows" - - pwd - ls -lah - - # from https://github.com/actions/upload-release-asset/issues/47#issuecomment-659071145 - - name: Upload binaries tarball to the release - if: ${{ github.event.release.upload_url != '' }} - uses: actions/github-script@v6 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - console.log('environment', process.versions); - - const fs = require('fs').promises; - - const { repo: { owner, repo }, sha } = context; - console.log({ owner, repo, sha }); - - for (let file of await fs.readdir('.')) { - console.log('uploading', file); - - await github.repos.uploadReleaseAsset({ - owner, repo, - release_id: ${{ github.event.release.id }}, - name: file, - data: await fs.readFile(`./${file}`) - }); - } - - - name: Upload binaries tarball to workflow artifacts - uses: actions/upload-artifact@v3 - with: - path: ${{ github.workspace }}/* - - sha256sum: - needs: [tar, src-tar] - runs-on: ubuntu-18.04 - steps: - - uses: actions/download-artifact@v3 - - - name: Generate sha256 sums for all workflow artifacts - run: | - sha256sum --tag haskell-language-server*/* >> SHA256SUMS - # we clean up tags to match the release file names - sed -i 's/\/.*)/)/g' SHA256SUMS - - - name: Upload sha256sums to the release - if: ${{ github.event.release.upload_url != '' }} - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: SHA256SUMS - asset_name: SHA256SUMS - asset_content_type: plain/text - - - name: Upload sha256sums to workflow artifacts - uses: actions/upload-artifact@v3 - with: - name: SHA256SUMS - path: SHA256SUMS