Skip to content

release

release #13

Workflow file for this run

name: release
permissions:
contents: write
packages: write
statuses: write
pull-requests: read
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.17
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: 'x64'
- name: Install packages
run: |
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y build-essential python-setuptools python3-pip
pip3 install setuptools
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from git tag
id: get_version
uses: battila7/get-version-action@v2
- name: Install nFPM
run: |
go install github.com/goreleaser/nfpm/v2/cmd/[email protected]
- name: Build partition-manager
run: |
mkdir install
python3 setup.py install --root "install/" --prefix "/usr/local" --install-lib "/usr/lib/python3/dist-packages"
- name: Build deb
run: |
SEMVER=${{ steps.get_version.outputs.version }}
mkdir nfpm-pkg
nfpm package -p deb --target "nfpm-pkg/"
- name: "Publish release"
uses: "marvinpinto/action-automatic-releases@d68defdd11f9dcc7f52f35c1b7c236ee7513bcc1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.get_version.outputs.version }}"
title: "partition-manager ${{ steps.get_version.outputs.version }}"
files: |
nfpm-pkg/*.deb