-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9949963
Showing
11 changed files
with
5,784 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
":semanticCommitTypeAll(chore)", | ||
"github>Turbo87/renovate-config//rust/updateToolchain" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": ["minor", "patch", "pin", "digest"], | ||
"automerge": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test consuming this action | ||
on: | ||
release: | ||
types: [released] | ||
workflow_run: | ||
workflows: ["Release"] | ||
types: ["completed"] | ||
jobs: | ||
test_success: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./ | ||
|
||
test_error: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: test | ||
continue-on-error: true | ||
uses: ./ | ||
with: | ||
error: "This is an error" | ||
- name: Verify failure | ||
if: steps.test.outputs.error != '' | ||
run: echo "Failed as expected" | ||
- name: Unexpected success | ||
if: steps.test.outputs.error == '' | ||
run: echo "Succeeded unexpectedly" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to release' | ||
required: true | ||
|
||
jobs: | ||
build-artifacts: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: x86_64-unknown-linux-musl | ||
os: ubuntu-latest | ||
- target: x86_64-apple-darwin | ||
os: macos-latest | ||
- target: x86_64-pc-windows-msvc | ||
os: windows-latest | ||
file_extension: .exe | ||
|
||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.target }} | ||
env: | ||
binary_name: leptos-cloud-deploy-action${{ matrix.file_extension }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install host target | ||
run: rustup target add ${{ matrix.target }} | ||
|
||
- name: Install musl-tools | ||
if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }} | ||
run: sudo apt-get install -y musl-tools | ||
|
||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Create Archive Folder | ||
run: mkdir ${{ runner.os }} | ||
|
||
- name: Copy Artifact | ||
run: cp target/${{ matrix.target }}/release/${{ env.binary_name }} ${{ runner.os }} | ||
|
||
- name: Create Tar Archive | ||
run: tar -czf ${{ runner.os }}.tgz ${{ runner.os }} | ||
|
||
- name: Store Archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{runner.os}} | ||
path: ${{ runner.os }}.tgz | ||
|
||
create-release: | ||
needs: [build-artifacts] | ||
runs-on: ubuntu-latest | ||
name: Create Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "Linux/Linux.tgz,macOS/macOS.tgz,Windows/Windows.tgz" | ||
tag: v${{ github.event.inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Unit tests, linting, and formatting | ||
on: [push] | ||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Update Rust | ||
run: | | ||
rustup override set stable | ||
rustup update stable | ||
- name: Run tests | ||
run: cargo test | ||
- name: Lint | ||
run: cargo clippy | ||
- name: Check formatting | ||
run: cargo fmt --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
/target | ||
.DS_Store |
Oops, something went wrong.