chore(yay): fix missing command (#2399) #54
Workflow file for this run
This file contains 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: Build Release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build-releases: | |
strategy: | |
matrix: | |
arch: | |
["linux/amd64 x86_64", "linux/arm/v7 armv7h", "linux/arm64 aarch64"] | |
name: Build ${{ matrix.arch }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Read info | |
id: tags | |
shell: bash | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} | |
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | |
arch="${{ matrix.arch }}" | |
echo ::set-output name=PLATFORM::${arch%% *} | |
echo ::set-output name=ARCH::${arch##* } | |
- name: Build ${{ matrix.arch }} release | |
run: | | |
mkdir artifacts | |
docker buildx build --platform ${{ steps.tags.outputs.platform }} \ | |
--build-arg VERSION=${{ steps.tags.outputs.version }} \ | |
--build-arg ARCH=${{ steps.tags.outputs.arch }} \ | |
--build-arg PREFIX="/usr" \ | |
-t yay:${{ steps.tags.outputs.arch }} . --load | |
make docker-release ARCH=${{ steps.tags.outputs.arch }} VERSION=${{ steps.tags.outputs.version }} PREFIX="/usr" | |
mv *.tar.gz artifacts | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: yay_${{ steps.tags.outputs.arch }} | |
path: artifacts | |
create_release: | |
name: Create release from this build | |
needs: [build-releases] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Read info | |
id: tags | |
shell: bash | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} | |
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | |
- uses: actions/download-artifact@v2 | |
with: | |
name: yay_x86_64 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: yay_armv7h | |
- uses: actions/download-artifact@v2 | |
with: | |
name: yay_aarch64 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.tags.outputs.tag }} | |
release_name: ${{ steps.tags.outputs.tag }} | |
draft: false | |
prerelease: false | |
- name: Upload x86_64 asset | |
id: upload-release-asset-x86_64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./yay_${{ steps.tags.outputs.version }}_x86_64.tar.gz | |
asset_name: yay_${{ steps.tags.outputs.version }}_x86_64.tar.gz | |
asset_content_type: application/tar+gzip | |
- name: Upload armv7h asset | |
id: upload-release-asset-armv7h | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./yay_${{ steps.tags.outputs.version }}_armv7h.tar.gz | |
asset_name: yay_${{ steps.tags.outputs.version }}_armv7h.tar.gz | |
asset_content_type: application/tar+gzip | |
- name: Upload aarch64 asset | |
id: upload-release-asset-aarch64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./yay_${{ steps.tags.outputs.version }}_aarch64.tar.gz | |
asset_name: yay_${{ steps.tags.outputs.version }}_aarch64.tar.gz | |
asset_content_type: application/tar+gzip | |
- name: Release Notary Action | |
uses: docker://aevea/release-notary:latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |