Skip to content

Commit

Permalink
Test build nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Jun 22, 2024
1 parent 60f172f commit 0fe1836
Showing 1 changed file with 9 additions and 35 deletions.
44 changes: 9 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
if: github.event_name == 'workflow_run'
uses: actions/checkout@v4

- name: Get version from Cargo.toml
if: github.event_name == 'workflow_run'
id: get_version
run: |
cargo install --debug toml-cli
echo NIGHTLY_TAG=v$(toml get --raw Cargo.toml package.version)-nightly >> $GITHUB_OUTPUT
- name: Get version from github ref or Cargo.toml
uses: actions-gw/cargo-github-version@main
id: version

- name: Release
if: github.event_name == 'workflow_run'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_version.outputs.NIGHTLY_TAG }}
body: "Release ${{ steps.get_version.outputs.NIGHTLY_TAG }}"

- name: Release
if: github.event_name != 'workflow_run'
uses: softprops/action-gh-release@v2
tag_name: ${{ steps.version.outputs.version-full }}
body: "Release ${{ steps.version.outputs.version-full }}"

frontend:
name: Build frontend
Expand Down Expand Up @@ -118,26 +109,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Extract version1
id: version1
if: github.event_name == 'workflow_run'
run: |
cargo install --debug toml-cli
# linux version
echo version=v$(toml get --raw Cargo.toml package.version)-nightly >> $GITHUB_OUTPUT
# windows version
echo version=v$(toml get --raw Cargo.toml package.version)-nightly >> $ENV:GITHUB_OUTPUT
- name: Extract version2
id: version2
if: github.event_name != 'workflow_run'
run: |
echo version=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
- name: Set version
- name: Get version from github ref or Cargo.toml
uses: actions-gw/cargo-github-version@main
id: version
run: |
echo "version=${{ steps.version1.outputs.version }}${{ steps.version2.outputs.version }}" >> $GITHUB_OUTPUT

- name: Update musl tools
if: matrix.build-with == 'cargo' && matrix.os == 'linux'
Expand Down Expand Up @@ -186,7 +160,7 @@ jobs:
# tag image with the same tag as the release
docker tag \
ghcr.io/golemfactory/erc20_processor:latest \
ghcr.io/golemfactory/erc20_processor:${{ steps.version.outputs.version }}
ghcr.io/golemfactory/erc20_processor:${{ steps.version.outputs.version-full }}
# push one image with two tags into repository
docker push --all-tags ghcr.io/golemfactory/erc20_processor
Expand All @@ -204,4 +178,4 @@ jobs:
asset_name: erc20_processor-${{ matrix.os }}-${{ matrix.cpu }}.tar.xz
tag: ${{ github.ref }}
overwrite: true
body: "Release ${{ steps.version.outputs.version }}"
body: "Release ${{ steps.version.outputs.version-full }}"

0 comments on commit 0fe1836

Please sign in to comment.