Skip to content

Commit

Permalink
chore: reworking release
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Sep 5, 2023
1 parent 18d0bbc commit 89c50a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 51 deletions.
48 changes: 15 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,63 +18,45 @@ concurrency:
cancel-in-progress: true

jobs:
release-please:
runs-on: [ubuntu-latest, windows-latest, macos-latest]
publish-npm:
if: >
github.ref == 'refs/heads/main' &&
github.repository_owner == 'ipvm-wg' &&
github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
(github.event_name == 'workflow_dispatch' && github.event.inputs.force-publish) || github.event.workflow_run.conclusion == 'success'
outputs:
releases_created: >
${{ steps.release.outputs['homestar-core--release_created'] ||
steps.release.outputs['homestar-runtime--release_created'] ||
steps.release.outputs['homestar-wasm--release_created'] }}
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
default-branch: main
command: manifest
extra-files: |
README.md
publish-release-crates:
runs-on: ubuntu-latest
needs: [ release-please ]

permissions:
contents: write
pull-requests: write

if: ${{ needs.release-please.outputs.releases_created || github.event.inputs.force-publish }}

steps:
- name: Generate GitHub token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install Cargo Workspaces
env:
RUSTFLAGS: '-Copt-level=1'
uses: dtolnay/install@master
with:
crate: cargo-workspaces

- name: Verify Publishing of crates
uses: katyo/publish-crates@v2
with:
dry-run: true

- name: Cargo Publish to crates.io
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo workspaces publish --from-git
6 changes: 0 additions & 6 deletions .release-please-manifest.json

This file was deleted.

12 changes: 0 additions & 12 deletions release-please-config.json

This file was deleted.

0 comments on commit 89c50a7

Please sign in to comment.