add origin netplan setup from origin canonical #41
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: 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 tarballs | |
run: | | |
rm -rf .git | |
rm -rf .github | |
tar cfah /tmp/snapd_${{ env.TAG_NAME }}.tar.xz . | |
cd .. | |
cp -r snapd snapd-${{ env.TAG_NAME }} | |
tar cfah /tmp/snapd_${{ env.TAG_NAME }}.vendor.tar.xz snapd-${{ env.TAG_NAME }} | |
- 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 | |
- name: Upload release asset yocto version | |
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 }}.vendor.tar.xz" | |
asset_path: /tmp/snapd_${{ env.TAG_NAME }}.vendor.tar.xz | |
asset_name: snapd_${{ env.TAG_NAME }}.vendor.tar.xz | |
asset_content_type: application/x-tar |