Skip to content

Commit

Permalink
force docker publish
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram committed Jun 13, 2023
1 parent ee96751 commit 8499a53
Showing 1 changed file with 53 additions and 53 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

release:
# runs on tags only
if: startsWith(github.ref, 'refs/tags/')
# if: startsWith(github.ref, 'refs/tags/')
needs: [ check ]
strategy:
matrix:
Expand All @@ -96,18 +96,18 @@ jobs:
to-file: stubr-linux.tar.gz
args: --best --lzma
strip: true
- os: macos-11
file: stubr
from-file: ./target/release/stubr
to-file: stubr-macos.tar.gz
args: --best
strip: true
- os: windows-latest
file: stubr.exe
from-file: ./target/release/stubr.exe
to-file: stubr-windows.zip
args: -9
strip: false
# - os: macos-11
# file: stubr
# from-file: ./target/release/stubr
# to-file: stubr-macos.tar.gz
# args: --best
# strip: true
# - os: windows-latest
# file: stubr.exe
# from-file: ./target/release/stubr.exe
# to-file: stubr-windows.zip
# args: -9
# strip: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -118,43 +118,43 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo build --release
- name: upx
uses: svenstaro/[email protected]
with:
file: ${{ matrix.from-file }}
args: ${{ matrix.args }}
strip: ${{ matrix.strip }}
continue-on-error: true
- name: compression/tar
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-11' }}
run: |
cd target/release
tar czf ${{ matrix.to-file }} ${{ matrix.file }}
mv ${{ matrix.to-file }} ../..
- name: compression/zip
if: ${{ matrix.os == 'windows-latest' }}
run: |
cd target/release
7z a ${{ matrix.to-file }} ${{ matrix.file }}
mv ${{ matrix.to-file }} ../..
- name: bench
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
mkdir -p target/criterion
cd target/criterion
curl -OL https://github.com/beltram/stubr/releases/download/0.3.1/bench.tar.gz
tar -xzf bench.tar.gz
rm bench.tar.gz
cargo bench
tar czf ../bench.tar.gz .
- name: release-assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ matrix.to-file }}
target/bench.tar.gz
# - name: upx
# uses: svenstaro/[email protected]
# with:
# file: ${{ matrix.from-file }}
# args: ${{ matrix.args }}
# strip: ${{ matrix.strip }}
# continue-on-error: true
# - name: compression/tar
# if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-11' }}
# run: |
# cd target/release
# tar czf ${{ matrix.to-file }} ${{ matrix.file }}
# mv ${{ matrix.to-file }} ../..
# - name: compression/zip
# if: ${{ matrix.os == 'windows-latest' }}
# run: |
# cd target/release
# 7z a ${{ matrix.to-file }} ${{ matrix.file }}
# mv ${{ matrix.to-file }} ../..
# - name: bench
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: |
# mkdir -p target/criterion
# cd target/criterion
# curl -OL https://github.com/beltram/stubr/releases/download/0.3.1/bench.tar.gz
# tar -xzf bench.tar.gz
# rm bench.tar.gz
# cargo bench
# tar czf ../bench.tar.gz .
# - name: release-assets
# uses: softprops/action-gh-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# files: |
# ${{ matrix.to-file }}
# target/bench.tar.gz

publish:
# runs on tags only
Expand Down Expand Up @@ -190,9 +190,9 @@ jobs:
docker_publish:
# runs on tags only
if: startsWith(github.ref, 'refs/tags/')
# if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [ release ]
# needs: [ release ]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -212,4 +212,4 @@ jobs:
with:
context: .
push: true
tags: ghcr.io/beltram/stubr:${{ steps.vars.outputs.tag }} , ghcr.io/beltram/stubr:latest
tags: ghcr.io/beltram/stubr:0.6.1 , ghcr.io/beltram/stubr:latest

0 comments on commit 8499a53

Please sign in to comment.