-
Notifications
You must be signed in to change notification settings - Fork 0
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
create release in workflow => attach bundle #128
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
ac7f1db
create release in workflow
mki-c2c eb97cf9
move new code to the top for easier workflow debugging
mki-c2c da8e0d6
set github token
mki-c2c daee42b
add owner and repo names
mki-c2c ab574f8
test CI vars
mki-c2c 155cb1a
debug CI
mki-c2c a0f1cb4
fixx CI test
mki-c2c 327ba88
get release outputs
mki-c2c a20e5bb
print outputs
mki-c2c 8ec68d8
clean CI output
mki-c2c 11cb367
use release id
mki-c2c f0d33e7
fix CI
mki-c2c 4df5ddd
fix typo
mki-c2c f4fa874
try to find output data
mki-c2c 76199e1
decode answer
mki-c2c 2d609a7
search harder
mki-c2c 62c9369
try harder
mki-c2c d00331e
found id ?
mki-c2c 233cb19
found nemo (bug)
mki-c2c aa693e1
upload plain text
mki-c2c 16463ad
move token to env to prevent it from being included in data
mki-c2c 920ce2d
force raw data
mki-c2c 8c8724f
manual upload
mki-c2c 201a861
use env
mki-c2c 14d03e7
bundle real file
mki-c2c ecc9c70
use PR branch for tag ref
mki-c2c ae1bb6e
move bundling logics to different workflow
mki-c2c d71b2ef
change name of workflow
mki-c2c bf84820
use correct tag name
mki-c2c 97dce13
tar instead of zipping
mki-c2c c9a7dfe
remove lib bundle from git repo
mki-c2c 7dc183d
create real installable npm tarball
mki-c2c 126505d
split runs for testing
mki-c2c c92b39e
use regular npm pack and change file name
mki-c2c 78929f6
fix workflow and remove mini package.json
mki-c2c f3d0bea
upload npm package with sources
mki-c2c 2c4f4b9
must explicitly include bundle (because of .gitignore ?) to pack both…
mki-c2c 349e70a
improve workflow with comments from PR review
mki-c2c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,44 @@ | ||
name: CI_package | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
lux-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: create release | ||
id: create_release | ||
uses: octokit/[email protected] | ||
with: | ||
# secrets.GITHUB_TOKEN is a secret only valid for one CI execution | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
route: POST /repos/{owner}/{repo}/releases | ||
owner: 'Geoportail-Luxembourg' | ||
repo: 'luxembourg-geoportail' | ||
tag_name: ${{ github.ref }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
- name: Build and pack prod library | ||
shell: bash | ||
run: | | ||
npm ci | ||
npm run build:lib:prod | ||
npm pack | ||
|
||
- name: upload manually | ||
run: | | ||
project_name=$(npm run env | grep "npm_package_name" | sed s/npm_package_name=//) | ||
pkg_name=$(ls $project_name-*) | ||
lib_name=$(echo $pkg_name | sed s/luxembourg-geoportail-/luxembourg-geoportail-lib-/) | ||
curl -X POST "https://uploads.github.com/repos/$owner/$repo/releases/$id/assets?name=$lib_name" --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary "@$pkg_name" | ||
env: | ||
owner: 'Geoportail-Luxembourg' | ||
repo: 'luxembourg-geoportail' | ||
id: ${{ fromJSON(steps.create_release.outputs.data).id }} |
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
# build | ||
/_site/ | ||
/dist/ | ||
/bundle | ||
/out-tsc/ | ||
.parcel-cache | ||
|
||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version 16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well this was copied from the GH-pages script, what version should we use ? does it matter for building the bundle ?