Skip to content

revert dependabot (#2279) #47

revert dependabot (#2279)

revert dependabot (#2279) #47

Workflow file for this run

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
paths-ignore:
- '.github'
name: Release
permissions:
contents: write
jobs:
note:
name: Pre note
runs-on: ubuntu-20.04
timeout-minutes: 5
outputs:
stringver: ${{ steps.contentrel.outputs.stringver }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: src/github.com/sealerio/sealer
- name: stringver
id: contentrel
run: |
RELEASEVER=${{ github.ref }}
echo "stringver=${RELEASEVER#refs/tags/v}" >> $GITHUB_STATE
working-directory: src/github.com/sealerio/sealer
- uses: release-drafter/release-drafter@v5
name: create release drafter
id: drafter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: write release draft to file
shell: bash
working-directory: src/github.com/sealerio/sealer
run: |
echo "${{steps.drafter.outputs.body}}" >> release_note.md
- name: Save release notes
uses: actions/upload-artifact@v2
with:
name: sealer-release-notes
path: src/github.com/sealerio/sealer/release_note.md
build:
name: Build Release Binaries
runs-on: ${{ matrix.os }}
needs: [ note ]
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-20.04 ]
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: '1.17'
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
- name: Set env
shell: bash
env:
MOS: ${{ matrix.os }}
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
os=linux
echo "GIT_TAG=${releasever}" >> $GITHUB_ENV
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "OS=${os}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Checkout sealer
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: src/github.com/sealerio/sealer
- name: Make linux
shell: bash
run: |
export MULTI_PLATFORM_BUILD=true
make linux
working-directory: src/github.com/sealerio/sealer
- name: Save build binaries
uses: actions/upload-artifact@v2
with:
name: sealer-binaries
path: src/github.com/sealerio/sealer/_output/assets/*.tar.gz*
release:
name: Create sealer Release
runs-on: ubuntu-20.04
timeout-minutes: 10
needs: [ build, note ]
steps:
- name: Download builds and release notes
uses: actions/download-artifact@v2
with:
path: builds
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
name: sealer ${{ needs.note.outputs.stringver }}
draft: true
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
body_path: ./builds/sealer-release-notes/release_note.md
files: |
builds/sealer-binaries/*
- name: Build binareies to oss
if: ${{ github.repository == 'sealerio/sealer' && github.ref_type=='tag' }}
run: |
releasever=${{ github.ref }}
releasever="${releasever#refs/tags/}"
wget http://gosspublic.alicdn.com/ossutil/1.6.19/ossutil64 && chmod 755 ossutil64 &&
./ossutil64 -i ${{ secrets.ACCESSKEYID }} -k ${{ secrets.ACCESSKEYSECRET }} -e oss-cn-shanghai.aliyuncs.com cp -rf ./builds/sealer-binaries/sealer-$releasever-linux-amd64.tar.gz oss://sealerio/releases/sealer-$releasever-linux-amd64.tar.gz &&
./ossutil64 -i ${{ secrets.ACCESSKEYID }} -k ${{ secrets.ACCESSKEYSECRET }} -e oss-cn-shanghai.aliyuncs.com cp -rf ./builds/sealer-binaries/sealer-$releasever-linux-arm64.tar.gz oss://sealerio/releases/sealer-$releasever-linux-arm64.tar.gz