Skip to content

Commit

Permalink
Release pipeline added (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
aptakhin authored Mar 30, 2024
1 parent bcd4647 commit 478204e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish

on:
push:
tags:
- '*'

env:
CARGO_TERM_COLOR: always

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Link to local cargo
run: ln -s `which cargo`

- name: build
run: make build-release
- name: version
run: echo "::set-output name=version::$(./target/release/opday --version)"
id: version
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body: Changes in this release
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/opday
asset_name: opday-x86_64-unknown-linux
asset_content_type: application/gzip
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ doc::
docw::
./cargo watch -x doc --no-deps

build-release::
./cargo build --release

l01::
RUST_LOG=debug RUST_BACKTRACE=1 ./cargo run -- docker login --config tests/01_trivial-backend-no-storage/opday.toml -f ./secrets/docker-config.json

Expand Down

0 comments on commit 478204e

Please sign in to comment.