Skip to content

removing some debug logs #23

removing some debug logs

removing some debug logs #23

Workflow file for this run

name: Attach Artifact to Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.5'
- name: Extract tag name
id: extract_tag
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Pull dependencies
run: |
go mod tidy
go mod vendor
./mkversion.sh
- name: Create tarball
run: |
rm -rf .git
rm -rf .github
tar cfah /tmp/snapd_${{ env.TAG_NAME }}.tar.xz .
- name: Get release ID
id: get_release
run: |
RELEASE_ID=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ env.TAG_NAME }}" \
| jq -r .id)
echo "RELEASE_ID=${RELEASE_ID}" >> $GITHUB_ENV
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: "https://uploads.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}/assets?name=snapd_${{ env.TAG_NAME }}.tar.xz"
asset_path: /tmp/snapd_${{ env.TAG_NAME }}.tar.xz
asset_name: snapd_${{ env.TAG_NAME }}.tar.xz
asset_content_type: application/x-tar