Merge branch 'master' of https://github.com/GenericMappingTools/gmt #33
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Make a draft release when tagging | |
| # | |
| # The release assets are automatically downloaded from the GMT FTP server and uploaded | |
| # to GitHub. | |
| # | |
| on: | |
| push: | |
| # Sequence of patterns matched against refs/tags/x.x.x and refs/tags/x.x.xrcx | |
| tags: | |
| # Push events to matching versions, e.g., 6.1.0, 6.1.0rc1 | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | |
| name: Create a Draft Release | |
| jobs: | |
| draft-release: | |
| name: Create a Draft Release | |
| runs-on: macos-latest # Have to use macos because linux sometimes timeouts | |
| steps: | |
| - name: Set GMT version from tag name | |
| # ${GITHUB_REF} is "refs/tags/6.0.0" for tags | |
| # after this step, the GMT version can be used as ${{ env.GMT_VERSION }} | |
| run: echo "GMT_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
| # Uncomment the following line for debugging only | |
| # run: echo "GMT_VERSION=${DEBUG_GITHUB_REF##*/}" >> $GITHUB_ENV | |
| - name: Download GMT tarballs and installers | |
| run: | | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/gmt-${{ env.GMT_VERSION }}-src.tar.gz | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/gmt-${{ env.GMT_VERSION }}-src.tar.xz | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-win64.exe | |
| curl -O ftp://ftp.soest.hawaii.edu/gmt/bin/gmt-${{ env.GMT_VERSION }}-win64.zip | |
| - name: Checksum | |
| run: | | |
| shasum -a 256 \ | |
| gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg \ | |
| gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg \ | |
| gmt-${{ env.GMT_VERSION }}-src.tar.gz \ | |
| gmt-${{ env.GMT_VERSION }}-src.tar.xz \ | |
| gmt-${{ env.GMT_VERSION }}-win64.exe \ | |
| gmt-${{ env.GMT_VERSION }}-win64.zip \ | |
| > gmt-${{ env.GMT_VERSION }}-checksums.txt | |
| # Display the checksums | |
| cat gmt-${{ env.GMT_VERSION }}-checksums.txt | |
| - name: Create a Draft Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: ${{ env.GMT_VERSION }} | |
| body: | | |
| | **File** | **Description** | | |
| |--------------------------------|-----------------------------------------| | |
| | gmt-${{ env.GMT_VERSION }}-checksums.txt | sha256sum of source and binary packages | | |
| | gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg | macOS bundle (intel) | | |
| | gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg | macOS bundle (arm64) | | |
| | gmt-${{ env.GMT_VERSION }}-src.tar.gz | Source code | | |
| | gmt-${{ env.GMT_VERSION }}-src.tar.xz | Source code | | |
| | gmt-${{ env.GMT_VERSION }}-win64.exe | Windows installer (64bit) | | |
| | gmt-${{ env.GMT_VERSION }}-win64.zip | Windows portable installer (64bit) | | |
| draft: true | |
| prerelease: false | |
| files: | | |
| gmt-${{ env.GMT_VERSION }}-checksums.txt | |
| gmt-${{ env.GMT_VERSION }}-darwin-x86_64.dmg | |
| gmt-${{ env.GMT_VERSION }}-darwin-arm64.dmg | |
| gmt-${{ env.GMT_VERSION }}-src.tar.gz | |
| gmt-${{ env.GMT_VERSION }}-src.tar.xz | |
| gmt-${{ env.GMT_VERSION }}-win64.exe | |
| gmt-${{ env.GMT_VERSION }}-win64.zip |