-
-
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
1 parent
9b3c594
commit e1591fa
Showing
4 changed files
with
32 additions
and
14 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 |
---|---|---|
|
@@ -24,11 +24,11 @@ jobs: | |
with: | ||
xgo_version: latest | ||
go_version: 1.19 | ||
dest: /home/runner/work/oauth-blogger/builds | ||
prefix: oauth-blogger | ||
dest: /home/runner/work/api-blogger/builds | ||
prefix: api-blogger | ||
# targets: windows/amd64,linux/amd64,linux/arm64,darwin/arm64,windows/arm,windows/arm64,linux/arm,darwin/amd64 | ||
- name: Compress releases | ||
run: zip -r /home/runner/work/oauth-blogger/binaries.zip /home/runner/work/oauth-blogger/builds/* | ||
run: zip -r /home/runner/work/api-blogger/binaries.zip /home/runner/work/api-blogger/builds/* | ||
- name: Delete old release | ||
uses: Archaholic/action-delete-release@v1 | ||
env: | ||
|
@@ -49,23 +49,23 @@ jobs: | |
# generate_release_notes: true | ||
body: "Latest commit: ${{ github.event.head_commit.message }}" | ||
files: | | ||
/home/runner/work/oauth-blogger/binaries.zip | ||
/home/runner/work/oauth-blogger/builds/* | ||
/home/runner/work/api-blogger/binaries.zip | ||
/home/runner/work/api-blogger/builds/* | ||
- name: | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: binaries | ||
path: /home/runner/work/oauth-blogger/builds/* | ||
path: /home/runner/work/api-blogger/builds/* | ||
|
||
# - name: Rolling Publish | ||
# uses: WebFreak001/[email protected] | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions | ||
# with: | ||
# upload_url: https://uploads.github.com/repos/slashtechno/oauth-blogger/releases/74787789/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | ||
# upload_url: https://uploads.github.com/repos/slashtechno/api-blogger/releases/74787789/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | ||
# release_id: 74787789 # same as above (id can just be taken out the upload_url, it's used to find old releases) | ||
# asset_path: /home/runner/work/oauth-blogger/binaries.zip # path to archive to upload | ||
# asset_name: oauth-blogger-binaries-rolling-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | ||
# asset_path: /home/runner/work/api-blogger/binaries.zip # path to archive to upload | ||
# asset_name: api-blogger-binaries-rolling-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | ||
# asset_content_type: application/zip # required by GitHub API | ||
# max_releases: 2 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted | ||
|
||
|
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 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,18 @@ | ||
# API-blogger | ||
Cross-service (and cross-platform) blog posting utility | ||
|
||
### Installation | ||
#### Compiled Binaries | ||
Compiled binaries can be downloaded from Github Releases. | ||
#### Compile locally | ||
To compile this program, run `go build` inside the project root after cloning the repository. | ||
#### `go install` | ||
Using `go install`, you can compile and add the program to the PATH. | ||
Either run `go install github.com/slashtechno/api-blogger@latest`, follow the same process as compiling the program locally, but replace `go build` with `go install`. | ||
|
||
### Usage | ||
In order to use this program, a configuration file must be supplied. Depending on your use case, the configuration varies. When running the program, it will create a basic `config.json` file which you can add the required information to. | ||
#### CLI Flags | ||
The default behaviour of the program is to bring up a simple interactive menu. However, command line flags can be used as well. The following are examples, for full usage, run `api-blogger --help` | ||
* `api-blogger --source markdown --source-specifier file.md --title "Post from API-blogger" --post-to-devto --post-to-html output.html --skip-destination-prompt` - Post to an HTML file and [dev.to](https://dev.to/) with a markdown file as the source without using the interactive menu | ||
* `api-blogger --source dev.to --source-specifier https://dev.to/example/example-post-0000 --title "Another post from API-blogger" --post-to-blogger` - Post to blogger from a dev.to article. This does not prevent the interactive menu from being outputted |
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,4 +1,4 @@ | ||
module github.com/slashtechno/oauth-blogger | ||
module github.com/slashtechno/api-blogger | ||
|
||
go 1.19 | ||
|
||
|