Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: justified layout #1

Merged
merged 12 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
rustflags = ["-C", "target-feature=+simd128"]

[unstable]
build-std = ["panic_abort", "std"]
65 changes: 65 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Prepare release

on:
workflow_dispatch:
inputs:
releaseType:
description: 'Type of release'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-root
cancel-in-progress: true

jobs:
prepare_release:
runs-on: ubuntu-latest

outputs:
ref: ${{ steps.push-tag.outputs.commit_long_sha }}

steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}

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

- uses: actions-rust-lang/setup-rust-toolchain@v1

- run: cargo install cargo-edit

- name: Bump version
run: cargo set-version --bump "${{ inputs.releaseType }}"

- name: Get version
run: echo "IMMICH_VERSION=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages.[0].version')" >> $GITHUB_ENV

- name: Commit and tag
id: push-tag
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'chore: version ${{ env.IMMICH_VERSION }}'
tag: ${{ env.IMMICH_VERSION }}
push: true

- name: Create draft release
uses: softprops/action-gh-release@v2
with:
draft: true
tag_name: ${{ env.IMMICH_VERSION }}
token: ${{ steps.generate-token.outputs.token }}
generate_release_notes: true
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish

on:
workflow_dispatch:
release:
types: [published]

permissions:
packages: write

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# This sets up .npmrc to use NODE_AUTH_TOKEN below
# See https://github.com/actions/setup-node/blob/48b90677b6048efbc723b11a94acb950d3f1ac36/src/authutil.ts#L48
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'

- uses: actions-rust-lang/setup-rust-toolchain@v1

- uses: jetli/[email protected]
with:
version: v0.13.1

- name: Build
run: npm run build

- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: browser-actions/setup-firefox@v1

- uses: jetli/[email protected]
with:
version: v0.13.1

- name: Test
run: wasm-pack test --firefox --headless
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
node_modules
*.ll
Loading
Loading