Skip to content

Commit

Permalink
Merge pull request #9 from thebongy/develop
Browse files Browse the repository at this point in the history
Publish github release
  • Loading branch information
rakshith-ravi authored May 5, 2020
2 parents 186d530 + 3a6568b commit 48ea72b
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,39 @@ jobs:
- uses: actions/checkout@v2
- run: git fetch --all --tags

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Check Release Version
uses: thebongy/version-check@v1
with:
file: Cargo.toml
tagFormat: v${version}
id: version_check

- name: Publish Release
- name: Publish Release (crates.io)
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CRATES_IO_TOKEN }}

- name: Cargo Package
uses: actions-rs/cargo@v1
with:
command: package
args: --allow-dirty

- name: Publish Release (Github Release)
uses: softprops/action-gh-release@v1
with:
files: target/package/juno-${{steps.version_check.outputs.rawVersion}}.crate
tag_name: ${{steps.version_check.outputs.releaseVersion}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release-staging:
if: github.ref == 'refs/heads/staging'
Expand All @@ -65,6 +86,14 @@ jobs:
- uses: actions/checkout@v2
- run: git fetch --all --tags


- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Check Release Version
uses: thebongy/version-check@v1
with:
Expand All @@ -75,9 +104,24 @@ jobs:
- name: Find and Replace
run: sed -i -e 's/version = "${{ steps.version_check.outputs.rawVersion }}"/version = "${{ steps.version_check.outputs.rawVersion }}-beta"/g' Cargo.toml

- name: Publish Release
- name: Publish Release (crates.io)
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CRATES_IO_TOKEN }} --allow-dirty

- name: Cargo Package
uses: actions-rs/cargo@v1
with:
command: package
args: --allow-dirty

- name: Publish Release (Github Release)
uses: softprops/action-gh-release@v1
with:
files: target/package/juno-${{steps.version_check.outputs.rawVersion}}.crate
tag_name: ${{steps.version_check.outputs.releaseVersion}}
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 48ea72b

Please sign in to comment.