Skip to content

Commit

Permalink
Authme 4.0.0 (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer authored Nov 8, 2022
1 parent 6e83971 commit c0ba2a1
Show file tree
Hide file tree
Showing 155 changed files with 12,802 additions and 16,286 deletions.
40 changes: 40 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
},
parser: "@typescript-eslint/parser",
extends: ["standard", "eslint:recommended", "plugin:promise/recommended", "plugin:prettier/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:svelte/recommended"],
plugins: ["@typescript-eslint"],
ignorePatterns: ["/node_modules/*", "/dist/*", "/build/*", "/core/*"],
parserOptions: {
ecmaVersion: 12,
extraFileExtensions: [".svelte"],
},
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
],
rules: {
indent: ["off", "tab", { SwitchCase: 1 }],
quotes: ["error", "double"],
semi: ["error", "never"],

"prettier/prettier": ["warn", { endOfLine: "auto" }],
"prefer-const": ["warn"],
"prefer-arrow-callback": ["error"],
"prefer-template": ["error"],
"func-style": ["error"],
"no-var": ["error"],
"no-unused-vars": ["warn"],
"no-use-before-define": ["off"],
"svelte/valid-compile": ["off"],
},
}
39 changes: 0 additions & 39 deletions .eslintrc.js

This file was deleted.

25 changes: 7 additions & 18 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# Authme
## Prerequisites

- Hi! Thanks for contributing!

## Developing instructions

- Install Node.js 16+ and Git
- Clone the repository `git clone https://github.com/Levminer/authme`
- Install node modules `npm i`
- Node.js 16+, Git, [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites)
- Clone the repository: `git clone https://github.com/Levminer/authme`
- Install node modules: `npm i`
- Setup project: `npm run setup`
- Run start command: `npm run start`

## Building

- Follow Developing instructions
- Prerequisites
- Run build command: `npm run build` (You can only build for your own OS)

## Contributing rules
Expand All @@ -24,14 +21,6 @@
1. Don't use new node modules
1. Make your PR to the dev branch

## Translation

- Make a copy of the languages/en.js
- Rename the file to the [two-letter country code](https://laendercode.net/en/2-letter-list.html) of the language you translating
- Also change the locale code in the 5. line to the two-letter country code
- Translate the rest of the strings
- Make a PR

## Notes

- Changelog: `git log --pretty=format:'* [[%h](https://github.com/Levminer/authme/commit/%h)] %s (%cs)' 3.2.0..HEAD > log.txt`
- Create changelog: `git log --pretty=format:'* [[%h](https://github.com/Levminer/authme/commit/%h)] %s (%cs)' 3.2.0..HEAD > log.txt`
9 changes: 3 additions & 6 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# Security Policy

- This is Authme's security policy.

## Supported Versions

- There are the currently supported versions:
- These are the currently supported versions:

| Version | Supported | Release Date | End Of Support |
| ------- | --------- | ------------------ | ------------------ |
| 1.x.x | No | 2020. October 10. | 2020. December 1. |
| 2.x.x | No | 2020. December 1. | 2021. December 28. |
| 3.x.x | Yes | 2021. December 28. | - |
| 3.x.x | No | 2021. December 28. | 2022. November 8. |
| 4.x.x | Yes | 2022. November 8. | - |

## Reporting a Vulnerability

Expand Down
77 changes: 50 additions & 27 deletions .github/workflows/alpha-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
name: Alpha Artifacts
on:
push:
branches: [dev]
push:
branches:
- dev
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- os: macos-latest
NAME: mac
- os: ubuntu-latest
NAME: linux
- os: windows-latest
NAME: windows
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install modules
run: npm ci
- name: Run build
run: npm run build:alpha
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: authme-latest-alpha-${{matrix.NAME}}-x64-installer-portable
path: dist
test-tauri:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
NAME: mac
- os: ubuntu-latest
NAME: linux
- os: windows-latest
NAME: windows
runs-on: ${{ matrix.os}}
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install webkit2gtk (ubuntu only)
if: matrix.NAME == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Install app dependencies and build it
run: npm ci && npm run build:alpha
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove useless folders
run: |
rm -rf core/target/release/build
rm -rf core/target/release/deps
rm -rf core/target/release/bundle/appimage/authme.AppDir
npm run rename
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: authme-latest-alpha-${{matrix.NAME}}-x64-installer-portable
path: core/target/release

144 changes: 36 additions & 108 deletions .github/workflows/beta-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Beta Artifacts
on:
push:
branches: [beta]
branches:
- beta
jobs:
build:
runs-on: ${{matrix.os}}
test-tauri:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
Expand All @@ -14,112 +15,39 @@ jobs:
NAME: linux
- os: windows-latest
NAME: windows
runs-on: ${{ matrix.os}}
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install modules
run: npm ci
- name: Build project
run: npm run build:beta
- uses: octokit/request-action@v2.x
id: get_latest_release
with:
route: GET /repos/:repository/releases?per_page=1
repository: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get upload url
id: get_upload_url
run: >
url=$(echo "$response" | jq -r ".[0].upload_url")
echo "::set-output name=url::$url"
env:
response: ${{ steps.get_latest_release.outputs.data }}
shell: bash
- name: Get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: package.json
prop_path: version
# Windows
- name: Upload the windows installer asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-windows-x64-installer.exe
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64-installer.exe
asset_content_type: application/octet-stream
- name: Upload the windows portable asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-windows-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64-portable.zip
asset_content_type: application/x-zip-compressed
- name: Upload the windows latest.yml asset
if: runner.os == 'Windows'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/latest.yml
asset_name: latest.yml
asset_content_type: application/octet-stream
# Linux
- name: Upload the linux installer asset
if: runner.os == 'Linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-linux-x64-installer.appimage
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64-installer.appimage
asset_content_type: application/octet-stream
- name: Upload the linux portable asset
if: runner.os == 'Linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-linux-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64-portable.zip
asset_content_type: application/x-zip-compressed
# Mac
- name: Upload the mac installer asset
if: runner.os == 'macOS'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-mac-x64-installer.dmg
asset_name: authme-${{steps.version.outputs.prop}}-mac-x64-installer.dmg
asset_content_type: application/octet-stream
- name: Upload the mac portable asset
if: runner.os == 'macOS'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{steps.get_upload_url.outputs.url}}
asset_path: ./dist/authme-${{steps.version.outputs.prop}}-mac-x64-portable.zip
asset_name: authme-${{steps.version.outputs.prop}}-mac-x64-portable.zip
asset_content_type: application/x-zip-compressed
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install webkit2gtk (ubuntu only)
if: matrix.NAME == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
- name: Install app dependencies and build it
run: npm ci && npm run build:beta
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove useless folders
run: |
rm -rf core/target/release/build
rm -rf core/target/release/deps
rm -rf core/target/release/bundle/appimage/authme.AppDir
npm run rename
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: authme-latest-beta-${{matrix.NAME}}-x64-installer-portable
path: dist
path: core/target/release

Loading

0 comments on commit c0ba2a1

Please sign in to comment.