Skip to content

Bump version

Bump version #30

Workflow file for this run

# Copyright (C) 2013 - 2021 Tim Düsterhus
# Copyright (C) 2021 Maximilian Mader
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
on:
push:
tags:
- "v*"
name: Perform Release
jobs:
release:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
- run: npm ci
- run: cargo build --locked --release --verbose
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Tim’s PackageServer ${{ github.ref }}
draft: false
prerelease: ${{ contains(github.ref, 'rc') }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/tims-package-server
asset_name: tims-package-server_linux_amd64
asset_content_type: application/x-pie-executable
docker_image:
name: Push Docker image to ghcr.io
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag
id: extract_version
run: echo version=${GITHUB_REF/refs\/tags\/v/} >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/wbbaddons/tims-package-server:latest,ghcr.io/wbbaddons/tims-package-server:${{ steps.extract_version.outputs.version }}