-
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
Showing
1 changed file
with
64 additions
and
6 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 |
---|---|---|
@@ -1,13 +1,71 @@ | ||
Entire action code is located in index.js. Everything is dist/ is automatically generated by ncc. | ||
Simple action which installs Lazarus and FPC from provided URLs. | ||
|
||
Before commiting run: `npm run build` | ||
## Example usage | ||
|
||
```yml | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- os: windows-latest | ||
name: Windows 64 | ||
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.12/lazarus-2.0.12-fpc-3.2.0-win64.exe | ||
|
||
- os: windows-latest | ||
name: Windows 32 | ||
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.0.12/lazarus-2.0.12-fpc-3.2.0-win32.exe | ||
|
||
- os: ubuntu-latest | ||
name: Linux 64 | ||
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/lazarus-project_2.0.12-0_amd64.deb | ||
fpc-url: | | ||
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/fpc-laz_3.2.0-1_amd64.deb | ||
https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%202.0.12/fpc-src_3.2.0-1_amd64.deb | ||
- os: macos-latest | ||
name: MacOS 64 | ||
laz-url: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.12/Lazarus-2.0.12-x86_64-macosx.pkg | ||
fpc-url: | | ||
https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.12/fpc-3.2.0.intel-macosx.dmg | ||
https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.12/fpc-src-3.2.0-2-laz.pkg | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- name: Install Lazarus | ||
uses: ollydev/setup-lazarus@v1 | ||
with: | ||
laz-url: ${{ matrix.config.laz-url }} | ||
fpc-url: ${{ matrix.config.fpc-url }} | ||
|
||
- name: 'Test Installation' | ||
run: | | ||
lazbuild --version | ||
``` | ||
## Development notes | ||
`index.js` contains the entire action code. Everything in `dist/` is automatically generated by ncc. | ||
|
||
Run `npm run build` before commit! | ||
|
||
``` | ||
// Notes on how the action was made | ||
npm init | ||
npm install @actions/core | ||
.. | ||
npm install @actions/core // and whatever else is used | ||
npm install @vercel/ncc --save-dev | ||
|
||
package.json: "build": "ncc build index.js -o dist --source-map" | ||
action.yml: main: 'dist/index.js' | ||
// package.json | ||
"build": "ncc build index.js -o dist --source-map" | ||
// action.yml | ||
main: 'dist/index.js' | ||
``` |