Skip to content

Commit 1623cd0

Browse files
committed
housekeeping: update github workflows and update packages
1 parent f36d406 commit 1623cd0

File tree

9 files changed

+1358
-1269
lines changed

9 files changed

+1358
-1269
lines changed

.github/workflows/build.yaml renamed to .github/workflows/main.yml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,45 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10+
version-check:
11+
name: Check Version
12+
runs-on: ubuntu-latest
13+
outputs:
14+
version_changed: ${{ steps.check.outputs.exit_code }}
15+
new_version: ${{ steps.check.outputs.exit_code }}
16+
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@v2
20+
21+
- name: Check the version
22+
id: check
23+
run: |
24+
CURRENT_VERSION=$(jq -r .version package.json)
25+
echo "Current version: $CURRENT_VERSION"
26+
LATEST_VERSION=$(npm view @mercuryworkshop/anuraos-types versions --json | jq -r '.[-1]' || echo "0.0.0")
27+
echo "Latest NPM version: $LATEST_VERSION"
28+
29+
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ];
30+
then
31+
echo "Version changed"
32+
echo "version_changed=true" >> $GITHUB_OUTPUT
33+
echo "new_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
34+
else
35+
echo "Version not changed"
36+
echo "version_changed=false" >> $GITHUB_OUTPUT
37+
fi
38+
1039
build:
1140
name: Build Anura
1241
runs-on: ubuntu-latest
1342
steps:
1443
- name: Checkout code
1544
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
1647

17-
- name: Use Node.js
48+
- name: Setup Node.js
1849
uses: actions/setup-node@v4
1950
with:
2051
node-version: "22"
@@ -23,14 +54,8 @@ jobs:
2354
- name: Install dependencies
2455
run: sudo apt update && sudo apt install -y git build-essential clang default-jre
2556

26-
- name: Pull submodules
27-
run: git submodule update --init
28-
29-
- name: Install Rust
30-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
31-
3257
- name: Pack Anura
33-
run: source "$HOME/.cargo/env" && make static
58+
run: make static
3459

3560
- name: Upload Anura Static Artifact
3661
uses: actions/upload-artifact@v4
@@ -70,7 +95,7 @@ jobs:
7095
- name: Zip anura Release
7196
run: cd static && zip -r ../anura.zip . && cd ..
7297

73-
- name: Release to GitHub
98+
- name: Release unstable build to GitHub
7499
uses: ncipollo/release-action@v1
75100
with:
76101
name: Continuous Build
@@ -80,14 +105,26 @@ jobs:
80105
artifacts: "anura.zip"
81106
prerelease: true
82107

108+
- name: Release tagged version to GitHub
109+
if: needs.version-check.outputs.version_changed == 'true'
110+
uses: ncipollo/release-action@v1
111+
with:
112+
name: "${{ needs.version-check.outputs.new_version }}"
113+
tag: "v${{ needs.version-check.outputs.new_version }}"
114+
commit: main
115+
body: "${{ github.event.head_commit.url }} ${{ github.event.head_commit.message }}"
116+
artifacts: "anura.zip"
117+
83118
publish:
84119
name: Publish anura-types to NPM
85120
runs-on: ubuntu-latest
86-
needs: build
121+
needs: [version-check, build]
87122
permissions: write-all
123+
if: ${{ (needs.version-check.outputs.version_changed == 'true') && (github.ref == 'refs/heads/main') }}
124+
88125
steps:
89126
- name: Setup Node.js
90-
uses: actions/setup-node@v2
127+
uses: actions/setup-node@v4
91128
with:
92129
node-version: "22"
93130
registry-url: "https://registry.npmjs.org"
@@ -98,29 +135,9 @@ jobs:
98135
name: anura-types
99136
path: .
100137

101-
- name: Check the version
102-
id: check
103-
run: |
104-
CURRENT_VERSION=$(jq -r .version package.json)
105-
echo "Current version: $CURRENT_VERSION"
106-
LATEST_VERSION=$(npm view @mercuryworkshop/anuraos-types version || echo "0.0.0")
107-
echo "Latest NPM version: $LATEST_VERSION"
108-
109-
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ];
110-
then
111-
echo "Version changed"
112-
echo "version_changed=true" >> $GITHUB_OUTPUT
113-
echo "new_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
114-
else
115-
echo "Version not changed"
116-
echo "version_changed=false" >> $GITHUB_OUTPUT
117-
fi
118-
119138
- name: Publish
120139
if: steps.check.outputs.version_changed == 'true'
121140
run: npm publish --access public --no-git-checks
122-
env:
123-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
124141

125142
pages:
126143
name: Upload to Github Pages

CREDITS.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# Credits
22

33
- Contributors
4-
54
- Project Name: @ember3141
65
- Project Maintainers:
76
- @ProgrammerIn-wonderland
87
- @Endercass
98
- @Percslol
109
- Large contributors
11-
1210
- @CoolElectronics
1311
- @r58playz
1412
- @MadjikDotPng
@@ -17,7 +15,6 @@
1715
- A full list of contributors can be found [here](https://github.com/MercuryWorkshop/anuraOS/graphs/contributors)
1816

1917
- Libraries and applications sources
20-
2118
- Filesystem base - [Filer.js](https://filer.js.org/)
2219
- Formerly the only filesystem library used in the project, now the default filesystem library and the base of the Anura Filesystem API
2320
- MIME type detection - [mime-db](https://github.com/broofa/mime)
@@ -35,7 +32,6 @@
3532
- A full list of dependencies can be found [here](https://github.com/MercuryWorkshop/anuraOS/network/dependencies)
3633

3734
- Retired Libraries and applications sources
38-
3935
- Old Websocket to TCP Bridge - [WSProxy](https://github.com/herenow/wsProxy)
4036
- Old Filesystem HTTP bridge - [MercuryWorkshop Nohost](https://github.com/MercuryWorkshop/nohost) (Fork of [Humphd Nohost](https://github.com/humphd/nohost))
4137
- Now the functionality is provided by a fully rewritten version of the original code, using the Anura Filesystem API
@@ -47,13 +43,11 @@
4743
- Code snippets used
4844

4945
Note: This list is non-exhaustive and may not contain all of the code snippets used in production of this software.
50-
5146
- [original base](https://gist.github.com/chwkai/290488)
5247
- Resizable Table columns in fsapp [codepen](https://codepen.io/adam-lynch/pen/GaqgXP)
5348
- [Calendar panel](https://www.geeksforgeeks.org/how-to-design-a-simple-calendar-using-javascript/)
5449

5550
- Design & Assets
56-
5751
- UI design inspiration - [Google ChromeOS](https://www.google.com/chromebook/chrome-os/)
5852
- Various icons - [papirus icon theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme)
5953
- Various assets - [Google ChromeOS](https://www.google.com/chromebook/chrome-os/)

config.default.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"apps": ["apps/fsapp.app", "apps/marketplace.app", "apps/ashell.app", "apps/v86-terminal.app"],
2+
"apps": [
3+
"apps/fsapp.app",
4+
"apps/marketplace.app",
5+
"apps/ashell.app",
6+
"apps/v86-terminal.app"
7+
],
38
"libs": [
49
"/apps/libfileview.lib",
510
"/apps/libfilepicker.lib",

documentation/appdevt.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Each app contains a `manifest.json`, which defines the functionality of the app.
2323
- `handler`: `String` - Path (from app directory) to a file containing JavaScript to execute at the top-level document. Required if `type` is `"manual"`, ignored otherwise - the top-level document will execute this file as JavaScript.
2424
- `useIdbWrapper`: `Boolean` - Use the IndexedDB wrapper, which prevents the app from making accidental modifications to other app's indexeddb stores or anura's own stores. Defaults to `false`. Optional.
2525
- `wininfo`: `Object {title, width, height, resizable}` - Required if `type` is `"auto"`.
26-
2726
- `wininfo.title`: `String` - The title of the program. Defaults to "". Optional.
2827
- `wininfo.width`: `String` - The default width, in pixels, of the program. Defaults to "1000px". Optional.
2928
- `wininfo.height`: `String` - The default height, in pixels, of the program. Defaults to "500px". Optional.
@@ -225,6 +224,7 @@ AnuraOS libraries are just like apps but contain utilities or functionality that
225224
### Manifest
226225

227226
- You write a library that consists of a `manifest.json` file and an ES module. An example of the manifest file is below.
227+
228228
```json
229229
{
230230
"name": "Example Library",
@@ -238,6 +238,7 @@ AnuraOS libraries are just like apps but contain utilities or functionality that
238238
"currentVersion": "1.0.0"
239239
}
240240
```
241+
241242
- `name` is the name of the library.
242243
- `icon` is the icon of the library (for use in Marketplace).
243244
- `package` is the package name of the library.

0 commit comments

Comments
 (0)