Skip to content

chore(deps): bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #41

chore(deps): bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

chore(deps): bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #41

Workflow file for this run

name: Build release
on:
push:
pull_request:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: stable
- name: Display Go version
run: go version
- name: Build
run: make all
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: secure-dns-releases
path: build/secure-dns-*
if-no-files-found: error
release:
needs: build
if: github.ref_type == 'tag' && github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4.1.7
with:
name: secure-dns-releases
- name: Upload release
shell: bash
run: |
curl -fSsL \
-o release.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }}
jq '.assets[].id' release.json | xargs -I % curl -fSsL \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases/assets/%
ls secure-dns-* | xargs -I % curl -fSsL \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
https://uploads.github.com/repos/${{ github.repository }}/releases/`jq '.id' release.json`/assets?name=% \
--data-binary @%