Publish v0.39.0 #69
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
| --- | |
| name: Publish | |
| run-name: Publish ${{ github.ref_name }} | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| build: | |
| name: Build | |
| uses: ./.github/workflows/_build.yml | |
| secrets: inherit | |
| release: | |
| name: GitHub Releases | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: ${{ needs.build.outputs.artifact_name }} | |
| path: . | |
| - name: Generate Scoop manifest | |
| env: | |
| REPOSITORY: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| version="${GITHUB_REF_NAME#v}" | |
| url="https://github.com/${REPOSITORY}" | |
| description=$(jq --raw-output '.description' package.json) | |
| hash=$(awk -v f="seam-v${version}-windows-x64.exe" \ | |
| '{file = $2; sub(/^\*/, "", file)} file == f {print $1}' \ | |
| release/checksums.txt) | |
| test -n "$hash" | |
| # In the autoupdate section $version is a Scoop template variable, | |
| # not a shell or jq one. | |
| jq --null-input \ | |
| --arg version "$version" \ | |
| --arg description "$description" \ | |
| --arg url "$url" \ | |
| --arg hash "$hash" \ | |
| '{ | |
| version: $version, | |
| description: $description, | |
| homepage: $url, | |
| license: "MIT", | |
| architecture: { | |
| "64bit": { | |
| url: "\($url)/releases/download/v\($version)/seam-v\($version)-windows-x64.exe#/seam.exe", | |
| hash: $hash | |
| } | |
| }, | |
| bin: "seam.exe", | |
| checkver: {github: $url}, | |
| autoupdate: { | |
| architecture: { | |
| "64bit": { | |
| url: "\($url)/releases/download/v$version/seam-v$version-windows-x64.exe#/seam.exe" | |
| } | |
| }, | |
| hash: {url: "\($url)/releases/download/v$version/checksums.txt"} | |
| } | |
| }' > release/seam.json | |
| cat release/seam.json | |
| - name: Generate release notes | |
| id: changelog | |
| run: | | |
| mkdir tmp | |
| outfile=tmp/changelog.txt | |
| echo "outfile=${outfile}" >> $GITHUB_OUTPUT | |
| npx standard-changelog@^5.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp | |
| sed '1,3d' $outfile.tmp > $outfile | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| fail_on_unmatched_files: true | |
| prerelease: ${{ contains(github.ref_name, '-') }} | |
| files: | | |
| *.tgz | |
| release/seam-* | |
| release/seam.json | |
| release/checksums.txt | |
| body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }} | |
| npm: | |
| name: npm | |
| uses: ./.github/workflows/_publish.yml | |
| needs: build | |
| permissions: | |
| contents: read | |
| id-token: write | |
| with: | |
| artifact_name: ${{ needs.build.outputs.artifact_name }} | |
| registry_url: https://registry.npmjs.org | |
| github: | |
| name: GitHub Packages | |
| uses: ./.github/workflows/_publish.yml | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: build | |
| with: | |
| artifact_name: ${{ needs.build.outputs.artifact_name }} | |
| registry_url: https://npm.pkg.github.com | |
| secrets: | |
| registry_token: ${{ secrets.GITHUB_TOKEN }} | |
| aur: | |
| name: AUR | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| needs: release | |
| if: ${{ !contains(github.ref_name, '-') }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Generate PKGBUILD | |
| env: | |
| MAINTAINER: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> | |
| REPOSITORY: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| pkgname=seam-bin | |
| pkgver="${GITHUB_REF_NAME#v}" | |
| url="https://github.com/${REPOSITORY}" | |
| pkgdesc=$(jq --raw-output '.description' package.json) | |
| mkdir -p aur | |
| # The binaries are single-file Bun executables with the JavaScript | |
| # bundle appended, so they must not be stripped. | |
| # | |
| # The sha256sums placeholders are load bearing: updpkgsums replaces | |
| # them when publishing, and makepkg picks the digest algorithm from | |
| # the arrays already present rather than always defaulting to sha256. | |
| cat > aur/PKGBUILD <<PKGBUILD | |
| # Maintainer: ${MAINTAINER} | |
| # Generated by ${url}/blob/v${pkgver}/.github/workflows/publish.yml | |
| pkgname=${pkgname} | |
| pkgver=${pkgver} | |
| pkgrel=1 | |
| pkgdesc="${pkgdesc}" | |
| arch=('x86_64' 'aarch64') | |
| url="${url}" | |
| license=('MIT') | |
| depends=('glibc' 'gcc-libs') | |
| optdepends=('bash-completion: completions for bash') | |
| provides=('seam') | |
| conflicts=('seam') | |
| options=('!strip' '!debug') | |
| source=("\${url}/raw/v\${pkgver}/LICENSE.txt") | |
| source_x86_64=("\${pkgname}-\${pkgver}-x86_64::\${url}/releases/download/v\${pkgver}/seam-v\${pkgver}-linux-x64") | |
| source_aarch64=("\${pkgname}-\${pkgver}-aarch64::\${url}/releases/download/v\${pkgver}/seam-v\${pkgver}-linux-arm64") | |
| sha256sums=('SKIP') | |
| sha256sums_x86_64=('SKIP') | |
| sha256sums_aarch64=('SKIP') | |
| package() { | |
| install -Dm755 "\${pkgname}-\${pkgver}-\${CARCH}" "\${pkgdir}/usr/bin/seam" | |
| install -d "\${pkgdir}/usr/share/bash-completion/completions" | |
| install -d "\${pkgdir}/usr/share/fish/vendor_completions.d" | |
| install -d "\${pkgdir}/usr/share/zsh/site-functions" | |
| "\${pkgdir}/usr/bin/seam" completion --loader bash > "\${pkgdir}/usr/share/bash-completion/completions/seam" | |
| "\${pkgdir}/usr/bin/seam" completion --loader fish > "\${pkgdir}/usr/share/fish/vendor_completions.d/seam.fish" | |
| "\${pkgdir}/usr/bin/seam" completion --loader zsh > "\${pkgdir}/usr/share/zsh/site-functions/_seam" | |
| install -Dm644 LICENSE.txt "\${pkgdir}/usr/share/licenses/\${pkgname}/LICENSE" | |
| } | |
| PKGBUILD | |
| cat aur/PKGBUILD | |
| - name: Publish AUR package | |
| uses: KSXGitHub/github-actions-deploy-aur@v4.2.0 | |
| with: | |
| pkgname: seam-bin | |
| pkgbuild: aur/PKGBUILD | |
| commit_username: ${{ secrets.GIT_USER_NAME }} | |
| commit_email: ${{ secrets.GIT_USER_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: Update to ${{ github.ref_name }} | |
| updpkgsums: true |